一、scrapy shell +url

scrapy爬虫shell用法

二、from scrapy.linkextractors import LinkExtractor

三、print response.xpath('//div[@class="pagecenter p3"]//strong/text()').extract()[0],xpath中为正则匹配

scrapy爬虫shell用法

四、正则匹配可以在Google浏览器中用Xpath helper测试,Xpath helper安装方法链接https://blog.csdn.net/qq_36045385/article/details/81744945

scrapy爬虫shell用法

相关文章: