summaryrefslogtreecommitdiff
path: root/scraper/s2.py
diff options
context:
space:
mode:
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()