[英]Scrapy - running spider from a python script
我正在尝试根据文档http://scrapy.readthedocs.io/en/0.16/topics/practices.html从python
脚本运行scrapy
def CrawlTest():
spider = PitchforkSpider(domain='"pitchfork.com"')
crawler = Crawler(Settings())
crawler.configure()
crawler.crawl(spider)
crawler.start()
log.start()
reactor.run() # the script will block here
但是当我运行它时,出现以下错误:
AttributeError: 'Settings' object has no attribute 'update_settings'
有什么不推荐的东西吗? 这是怎么了
我的版本是Scrapy 1.1.2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.