Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from selenium import webdriver
- delay=10
- browser = webdriver.Chrome()
- browser.get('https://www.betbrain.com/baseball/united-states/mlb/')
- WebDriverWait(browser, delay).until(ec.presence_of_element_located((By.XPATH, '//*[@id="app"]/div/section/section/nav')))
- table_check = browser.find_element_by_xpath('//*[@id="app"]/div/section/section/main/div[3]/div[2]/div[2]/div[1]/ul') #find the table containing games
- body_rows = table_check.find_elements_by_xpath('//*[@id="app"]/div/section/section/main/div[3]/div[2]/div[2]/div[1]/ul/li[1]') #find each indvidual game
- Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="app"]/div/section/section/main/div[3]/div[2]/div[2]/div[1]/ul"}
Add Comment
Please, Sign In to add comment