scrapy爬虫shell用法

一、scrapy shell +url

二、from scrapy.linkextractors import LinkExtractor

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

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

猜你喜欢

转载自blog.csdn.net/qq_36045385/article/details/81746020