summaryrefslogtreecommitdiff
path: root/scraper/s2-final-report.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-02-11 13:50:14 +0100
committerJules Laplace <julescarbon@gmail.com>2019-02-11 13:50:14 +0100
commit178381871ce0b8b2be7946320f90b0568ba58911 (patch)
treeedb25065c07444474391d9e59ca223293988cbff /scraper/s2-final-report.py
parent730a32a51cac1d1b70fdade93d0986b8b4e1ac69 (diff)
update
Diffstat (limited to 'scraper/s2-final-report.py')
-rw-r--r--scraper/s2-final-report.py14
1 files changed, 0 insertions, 14 deletions
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()