Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chrome_path =r"C:UsersTomDesktopchromedriver.exe"
- driver = webdriver.Chrome(chrome_path)
- driver.get("https://pointsbet.com.au/basketball/NBA")
- time.sleep(2)
- driver.find_element_by_xpath("""/html/body/div[1]/div[2]/sport-competition-component/div[1]/div[2]/div[1]/div/event-list/div[1]/event/div/header/div[1]/h2/a""").click()
- time.sleep(2)
- posts = driver.find_elements_by_class_name("market")
- for post in posts:
- print(post.text)
- with open('output12.txt',mode ='w') as f:
- f.write(str(post))
- <selenium.webdriver.remote.webelement.WebElement (session="af079b982b14f33d736b6745ad6e9648", element="0.8397874328987758-6")>
Add Comment
Please, Sign In to add comment