Scrapy, a fast high-level web crawling & scraping framework for Python.
Include loading settings in `Running multiple spiders in the same process` section
Ricardo Amendoeirab247fa9982a3
diff --git a/docs/topics/practices.rst b/docs/topics/practices.rstindex cf1de1bd1..db1ed362e 100644--- a/docs/topics/practices.rst+++ b/docs/topics/practices.rst@@ -118,6 +118,7 @@ Here is an example that runs multiple spiders simultaneously:::import scrapy+ from scrapy.utils.project import get_project_settingsfrom scrapy.crawler import CrawlerProcessclass MySpider1(scrapy.Spider):@@ -128,7 +129,8 @@ Here is an example that runs multiple spiders simultaneously:# Your second spider definition...- process = CrawlerProcess()+ settings = get_project_settings()+ process = CrawlerProcess(settings)process.crawl(MySpider1)process.crawl(MySpider2)process.start() # the script will block here until all crawling jobs are finished