我是python数据刮取的新手,并尝试从kickstarter刮取数据。 我正在使用以下代码从中提取位置数据
我正在使用以下代码
test_page=requests.get('https://www.kickstarter.com/discover/advanced?term=security&sort=magic&seed=2425842&page=1')
test_pagetree= html.fromstring(test_page.content)
test_loc= test_pagetree.xpath('//[@id="projects_list"]/li/div/div/div/a/span')[0].text
以及获取“列表索引超出范围”错误
我正在使用GoogleChrome检查并获取上面元素的xpath
可以使用
location-name
类选择位置元素,如下所示:相关问题 更多 >
编程相关推荐