我正在尝试从单个python脚本http://doc.scrapy.org/en/0.24/topics/practices.html
运行scrapy但是我收到以下错误:
Traceback (most recent call last):
File "single_python_script.py", line 16, in <module>
crawler = Crawler(settings)
File "/Library/Python/2.7/site-packages/scrapy/crawler.py", line 32, in __init__
self.spidercls.update_settings(self.settings)
AttributeError: 'Settings' object has no attribute 'update_settings'
答案 0 :(得分:0)
从Scrapy 1.0开始,您应该使用CrawlerProcess
而不是Crawler
从脚本运行Scrapy Spider。
有关更多信息,请参见latest documentation。