diff --git a/1_read_paper_json.py b/1_read_paper_json.py index 47fb182..5a7d9eb 100644 --- a/1_read_paper_json.py +++ b/1_read_paper_json.py @@ -87,9 +87,10 @@ process = CrawlerProcess(settings) -process.crawl(OparlSpider, **spargs) +crawler = process.create_crawler(OparlSpider) +process.crawl(crawler, **spargs) process.start() -failed = process.stats.get_value('custom/failed_job') +failed = crawler.stats.get_value('custom/failed_job') if failed: sys.exit(1)