From 0ae8280f3447876e004934514049e1d107712670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Reichert?= Date: Wed, 11 Oct 2023 22:26:57 +0200 Subject: [PATCH] get crawler --- 1_read_paper_json.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)