我正在尝试使用以下代码从XPath表达式中提取文本内容:
page = requests.get('https://www.momondo.com/flight-search/PHL-VCE/2019-06-19-flexible/2019-06-25-flexible?sort=price_a')
tree = html.fromstring(page.content)
price = tree.xpath('//span[@class="title price"]/text()')
print(price)
但是,打印结果仅为:[]
我在做错什么吗?