Trying to scrape odds from fanduel, goal is to get the player's name. In this case Jayson Tatum.
Even when I copy the xpath directly from chrome it doesnt seem to work. Though it works when I hardcode and look for an element through xpath containing the text Jayson Tatum. This is my code
name = WebDriverWait(driver, 20).until(
EC.presence_of_element_located((By.XPATH,'//*[@id="root"]/div/div[2]/div[1]/div/div[2]/div[3]/div/div[2]/div/div[3]/div[1]/div/div/div[1]/span')))
Also tried this
name = driver.find_element(By.XPATH, '//*[@id="root"]/div/div[2]/div[1]/div/div[2]/div[3]/div/div[2]/div/div[3]/div[1]/div/div/div[1]/span')
Still get a NoSuchElement trying both ways.