summaryrefslogtreecommitdiff
path: root/scraper/s2-search.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-02-08 23:19:04 +0100
committerJules Laplace <julescarbon@gmail.com>2019-02-08 23:19:04 +0100
commit8e26cbff5171fb204082e1b6778d17f786c1eb16 (patch)
treef8420a6268d1c624572091881f0b02cf17d0b695 /scraper/s2-search.py
parent6059ce2eb68a931a4cbb12049c202c3299e4966b (diff)
reports of which paper titles matched
Diffstat (limited to 'scraper/s2-search.py')
-rw-r--r--scraper/s2-search.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/scraper/s2-search.py b/scraper/s2-search.py
index d9b1beca..77800e32 100644
--- a/scraper/s2-search.py
+++ b/scraper/s2-search.py
@@ -59,23 +59,5 @@ def fetch_entries(index, refresh):
citation_lookup.append([key, name, title, paper_id])
write_csv("datasets/citation_lookup.csv", keys=['key', 'name', 'title', 'paper_id'], rows=citation_lookup)
-def fetch_paper(s2, paper_id):
- os.makedirs('./datasets/s2/papers/{}/{}'.format(paper_id[0:2], paper_id), exist_ok=True)
- paper_fn = './datasets/s2/papers/{}/{}/paper.json'.format(paper_id[0:2], paper_id)
- if os.path.exists(paper_fn):
- return read_json(paper_fn)
- print(paper_id)
- paper = s2.paper(paper_id)
- if paper is None:
- print("Got none paper??")
- # time.sleep(random.randint(1, 2))
- paper = s2.paper(paper_id)
- if paper is None:
- print("Paper not found")
- return None
- write_json(paper_fn, paper)
- # time.sleep(random.randint(1, 2))
- return paper
-
if __name__ == '__main__':
fetch_entries()