在1个网站上并行运行多个Spiders?

在1个网站上并行运行多个Spiders?,第1张

在1个网站上并行运行多个Spiders?

我认为您正在寻找的是这样的:

import scrapyfrom scrapy.crawler import CrawlerProcessclass MySpider1(scrapy.Spider):    # Your first spider definition    ...class MySpider2(scrapy.Spider):    # Your second spider definition    ...process = CrawlerProcess()process.crawl(MySpider1)process.crawl(MySpider2)process.start() # the script will block here until all crawling jobs are finished

您可以在以下位置阅读更多信息:在同一进程中运行多个蜘蛛



欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5645968.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存