Created
February 27, 2020 17:00
-
-
Save sauceaaron/a0086a1a53ceb650125f9c58df1ffb89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| from time import sleep | |
| from selenium import webdriver | |
| sites = ['https://google.com', 'https://bing.com', 'https://duck.com'] | |
| interval = 60 #seconds | |
| iterations = 10 #times | |
| def poll_site(url): | |
| driver = webdriver.Chrome() | |
| driver.get(url) | |
| title = driver.title | |
| driver.quit() | |
| return title | |
| while (iterations > 0): | |
| for url in sites: | |
| print(poll_site(url)) | |
| sleep(interval) | |
| iterations -= 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment