Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def drive():
- """Drive program.
- Sleep for 5 seconds, then refresh page. If there are available hours,
- click on them. If no available hours, then reset loop.
- """
- while True:
- time.sleep(5)
- driver.refresh()
- html = driver.page_source
- html_soup = soup(html, "html.parser")
- hour_container = html_soup.findAll("li", {"class": "available"})
- if not hour_container:
- continue
- for hour in hour_container:
- hour.click()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement