我认为您正在寻找的是这样的:
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
您可以在以下位置阅读更多信息:在同一进程中运行多个蜘蛛。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)