python – Problem with scraping in Selenium. It does not scrape

python – Problem with scraping in Selenium. It does not scrape

driver.get(https://www.betexplorer.com/soccer/england/premier-league/fixtures/)

wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, .table-main__datetime)))

for PremierLeague in driver.find_elements(By.XPATH, //*[@class=h-text-left and contains(text(),Round)]):
    PremierLeague_text = PremierLeague.text
    number = re.findall(rd+, PremierLeague_text)
    Values_PremierLeague.append(tuple([number]))
    print(number)

Not sure what you meant by numbers also not sure why you want tuples. But you had an issue where you never used PremierLeague_text

Outputs:

[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
[22]
[23]
[24]
[25]
[26]
[27]
[28]
[29]
[30]
[31]
[32]
[33]
[34]
[35]
[36]
[37]
[38]

python – Problem with scraping in Selenium. It does not scrape

Leave a Reply

Your email address will not be published. Required fields are marked *