Advertisement
carlosrdz00

Untitled

Jul 20th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. while True:
  2.     html = driver.page_source
  3.     html_soup = soup(html, "html.parser")
  4.     hour_container = html_soup.findAll("li",{"class":"available"})
  5.     if hour_container:
  6.         for hours in hour_container:
  7.             driver.find_element_by_class_name("available").click()
  8.                        html = driver.page_source
  9.             html_soup = soup(html, "html.parser")
  10.             hour_container = html_soup.findAll("li", {"class": "available"})
  11.             if not hour_container:
  12.                 break
  13.     driver.refresh()
  14.     time.sleep(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement