Advertisement
carlosrdz00

Untitled

Jul 20th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 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.             message = client.messages \
  9.                 .create(
  10.                 body="just copped an hour",
  11.                 from_='+19562757627',
  12.                 to='+19565890909'
  13.             )
  14.             html = driver.page_source
  15.             html_soup = soup(html, "html.parser")
  16.             hour_container = html_soup.findAll("li", {"class": "available"})
  17.             if not hour_container:
  18.                 break
  19.     driver.refresh()
  20.     time.sleep(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement