0
我尝试使用Python中的lxml在网站上刮取特定元素。下面你可以找到我的代码,但没有输出。Python lxml xpath返回无输出
from lxml import html
webpage = 'http://www.funda.nl/koop/heel-nederland/'
page = requests.get(webpage)
tree = html.fromstring(page.content)
content = '//*[@id="content"]/form/div[2]/div[5]/div/a[8]/text()'
content = str(tree.xpath(content))
print content