【发布时间】:2020-09-09 19:36:15
【问题描述】:
你好我正在刮这个页面https://www.betexplorer.com/soccer/china/super-league-2016/beijing-guoan-henan-jianye/S49KzkvO/我必须刮这些数据
Country = driver.find_element_by_xpath("/html/body/div[4]/div[4]/div/div/div[1]/section/ul[1]/li[3]/a").text
leagueseason = driver.find_element_by_xpath("/html/body/div[4]/div[4]/div/div/div[1]/section/header/h1/a").text
Home = driver.find_element_by_xpath("/html/body/div[4]/div[4]/div/div/div[1]/section/ul[2]/li[1]/h2/a").text
Away = driver.find_element_by_xpath("/html/body/div[4]/div[4]/div/div/div[1]/section/ul[2]/li[3]/h2/a").text
我尝试使用这些 XPATH,但我会适应更具体的 XPath,因为这可能会发生变化。有什么建议吗?谢谢
【问题讨论】:
标签: python selenium xpath css-selectors webdriverwait