1 pièce(s) jointe(s)
Selenium Chrome Webscrapping: naviguer avec find_elements_by_xpath
Bonjour,
Via selenium-python
Je cherche a naviguer dans le code html ci dessous mais je n'arrive pas a trouver tous les textes que je souhaite quand je descends dans le code :weird:
Quelqu'un aurait il une idée de mon erreur?
Merci de votre attention
Jerome
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
tableli=driver.find_elements_by_xpath(".//li[@class='match-centre-stat has-stats' and @data-for='passSuccess']")
# tableli est constitué de 2 WebElements
tableli[0].find_element_by_xpath(".//h4").text
result OK => 'Pass Success%'
tableli[0].find_element_by_xpath(".//div").text
result OK =>'79 - 80'
tableli=driver.find_elements_by_xpath(".//li[@class='match-centre-stat match-centre-sub-stat' and @data-for='passSuccess']")
# tableli est constitué de 2 WebElements
tableli[0].find_element_by_xpath(".//h4").text
result KO => ''
tableli[0].find_element_by_xpath(".//div").text
result KO =>'' |
Pièce jointe 570118