Launch spriders from main Immoscrap.py script

This commit is contained in:
Jordan ERNST 2020-08-12 22:36:22 +02:00
parent 1e18327a9e
commit d42cc51088
1 changed files with 13 additions and 0 deletions

13
ImmoScrap.py Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env ipython3
from scrapy.crawler import CrawlerProcess
from scrapy.utils.project import get_project_settings
process = CrawlerProcess(get_project_settings())
# Will crawl simultaneously:
process.crawl('leboncoin')
process.crawl('seloger')
process.crawl('pap')
process.start() # the script will block here until the crawling is finished