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