From fab8895268545575e0da9258bca2def6ce67550b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 3 May 2019 19:15:22 +0200 Subject: if not --- scraper/s2-final-report.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scraper/s2-final-report.py') diff --git a/scraper/s2-final-report.py b/scraper/s2-final-report.py index 854aa940..29b701b5 100644 --- a/scraper/s2-final-report.py +++ b/scraper/s2-final-report.py @@ -134,6 +134,8 @@ def process_single_paper(row, paper_id, addresses, aggregate_citations, unknown_ if paper_id == 'search': dataset = row['key'] fn = 'datasets/s2/search_papers/{}.json'.format(dataset) + if not os.path.exists(fn): + return with open(fn, 'r') as f: citations = json.load(f) data = { 'citations': [ { 'paperId': paperId } for paperId in citations ] } -- cgit v1.2.3-70-g09d2