我想爬this page。在
我想从一个给定的网站使用Scrapy的所有链接
我正试着这样-
import scrapy
import unidecode
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from lxml import html
class ElementSpider(scrapy.Spider):
name = 'linkdata'
start_urls = ["https://www.goodreads.com/list/show/19793.I_Marked_My_Calendar_For_This_Book_s_Release",]
def parse(self, response):
links = response.xpath('//div[@id="all_votes"]/table[@class="tableList js-dataTooltip"]/div[@class="js-tooltipTrigger tooltipTrigger"]/a/@href').extract()
print links
但我什么也没得到。在
我觉得你的xpath有问题。试试这个-
希望有帮助:)
祝你好运。。。在
相关问题 更多 >
编程相关推荐