Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
510 B
1
Indexable
Never
from selenium import webdriver
import time

# Set the path to the chromedriver executable
chromedriver_path = '/path/to/chromedriver'  # replace with your path

# Create an instance of Chrome WebDriver
browser = webdriver.Chrome(chromedriver_path)

# Navigate to the desired website
browser.get('http://www.example.com')

# Loop to refresh every second
try:
    while True:
        time.sleep(1)  # Wait for 1 second
        browser.refresh()
except KeyboardInterrupt:
    print("Refreshing stopped by user.")
Leave a Comment