From 178381871ce0b8b2be7946320f90b0568ba58911 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 11 Feb 2019 13:50:14 +0100 Subject: update --- scraper/s2-final-report.py | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'scraper/s2-final-report.py') diff --git a/scraper/s2-final-report.py b/scraper/s2-final-report.py index c99edaee..e8307b8d 100644 --- a/scraper/s2-final-report.py +++ b/scraper/s2-final-report.py @@ -34,7 +34,6 @@ def process_paper(row, addresses): address = res['address'] if not len(papers): return - for papers[0]['address'] with open('{}/{}.json'.format(DIR_PUBLIC_CITATIONS, row['key']), 'w') as f: json.dump({ 'id': papers[0]['paper_id'], @@ -189,18 +188,5 @@ def load_megapixels_lookup(): # recs.append(rec) return lookup -def load_institutions(paperId): - if os.path.exists(file_path('pdf', paperId, 'institutions.json')): - return read_json(file_path('pdf', paperId, 'institutions.json'))['institutions'] - elif os.path.exists(file_path('doi', paperId, 'institutions.json')): - return read_json(file_path('doi', paperId, 'institutions.json'))['institutions'] - else: - return [] - -def data_path(key, paper_id): - return 'datasets/s2/{}/{}/{}'.format(key, paper_id[0:2], paper_id) -def file_path(key, paper_id, fn): - return os.path.join(data_path(key, paper_id), fn) - if __name__ == '__main__': s2_final_report() -- cgit v1.2.3-70-g09d2