Guest User

Untitled

a guest
Jun 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. from selenium import webdriver
  2.  
  3. delay=10
  4.  
  5. browser = webdriver.Chrome()
  6. browser.get('https://www.betbrain.com/baseball/united-states/mlb/')
  7. WebDriverWait(browser, delay).until(ec.presence_of_element_located((By.XPATH, '//*[@id="app"]/div/section/section/nav')))
  8.  
  9.  
  10. 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
  11. 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
  12.  
  13. 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