案例1:scrapy crawl somespider
类型多次(同时,使用nohup背景)
案例2:使用CrawlerProcess并在python脚本中配置multispider并运行
什么是差异案例?我已经尝试过使用5只蜘蛛的情况2但不是那么快。
scrapy crawl
为每个蜘蛛使用一个过程,而CrawlerProcess
在一个过程中使用单个Twisted Reactor(同时也在我不太确定的情况下做一些事情)同时运行多个蜘蛛。
所以,基本上:
scrapy crawl
- >不止一个过程CrawlerProcess
- >只使用Twisted Reactor运行一个进程