summaryrefslogtreecommitdiff
path: root/scraper/s2.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-05-03 19:11:07 +0200
committerJules Laplace <julescarbon@gmail.com>2019-05-03 19:11:07 +0200
commit4f823ca49a01becafdcd38c4d342080c1f29ce87 (patch)
treee9cb3da884e9101561e6ad74adbbc908b58ba808 /scraper/s2.py
parenta53909352266a2258ddfa287508f979da59a9d1d (diff)
final report stuph
Diffstat (limited to 'scraper/s2.py')
-rw-r--r--scraper/s2.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scraper/s2.py b/scraper/s2.py
index 26334de8..62fd9a94 100644
--- a/scraper/s2.py
+++ b/scraper/s2.py
@@ -178,7 +178,7 @@ class SemanticScholarAPI(object):
@staticmethod
def search(q, page=1, pageSize=10, yearFilter=None):
- resp = requests.post(SemanticScholarAPI.SEARCH_ENDPOINT, json={
+ query = {
'authors': [],
'coAuthors': [],
'facets': {},
@@ -190,6 +190,7 @@ class SemanticScholarAPI(object):
'sort': "relevance",
'venues': [],
'yearFilter': yearFilter,
- }, headers=SemanticScholarAPI.headers)
+ }
+ resp = requests.post(SemanticScholarAPI.SEARCH_ENDPOINT, json=query, headers=SemanticScholarAPI.headers)
# print(resp.status_code)
return None if resp.status_code != 200 else resp.json()