diff options
Diffstat (limited to 'scraper/s2-citation-report.py')
| -rw-r--r-- | scraper/s2-citation-report.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scraper/s2-citation-report.py b/scraper/s2-citation-report.py index 58b323c4..37177957 100644 --- a/scraper/s2-citation-report.py +++ b/scraper/s2-citation-report.py @@ -9,7 +9,7 @@ import subprocess from util import * DIR_PUBLIC_CITATIONS = "../site/datasets/citations" -paper_location_lookup = fetch_google_lookup('paper_locations') +paper_location_lookup = fetch_google_lookup('paper_locations', item_key='paper_id') @click.command() def s2_citation_report(): @@ -362,13 +362,13 @@ def load_megapixels_queries(): recs.append(rec) return recs -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 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) |
