一. domz.py from scrapy.linkextractors import LinkExtractor from scrapy.spiders import CrawlSpider, Rule class DmozSpider(CrawlSpider): """Follow categories and extract links.""" name = 'dmoz' #gihtub上面给的举例网址挂了,换成这个 allowed_d
这2天遇到一个问题,之前调试的时候爬取了一些数据,结果第二天重新调试的时候发现爬虫很快结束,而且还没有报错.后来从日志里看到这个: no more duplicates will be shown (see DUPEFILTER_DEBUG to show all duplicate 这句就是在get第一个链接后出现的日志,大概意思就是“不会重复出现”,所以我猜想可能是因为redis自带了去重的机制,所以已经爬取的内容不会重新去爬 后来我去百度解决方案.首先,有人说在setting里把SCHED