【发布时间】:2020-08-05 15:46:04
【问题描述】:
我正在从this page 那里获取所有开盘赔率 但我想跳过所有取消的事件(如this page)并打印如下空白结果:
try:
xpath = '//table[starts-with(@id,"aodds")]//tr[th="Opening odds"]/following-sibling::tr/td[@class="bold"]'
except:
print('')
homeodd = driver.find_element_by_xpath(xpath).text
【问题讨论】:
标签: python python-3.x selenium selenium-webdriver xpath