summaryrefslogtreecommitdiff
path: root/scraper/s2.py
diff options
context:
space:
mode:
Diffstat (limited to 'scraper/s2.py')
-rw-r--r--scraper/s2.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/scraper/s2.py b/scraper/s2.py
index 36dbc906..ec6a9172 100644
--- a/scraper/s2.py
+++ b/scraper/s2.py
@@ -178,9 +178,7 @@ class SemanticScholarAPI(object):
@staticmethod
def search(q, page=1, pageSize=10, yearFilter=None):
- #print(q)
- #print(yearFilter)
- resp = requests.post(SemanticScholarAPI.SEARCH_ENDPOINT, json={
+ query = {
'authors': [],
'coAuthors': [],
#'facets': {},
@@ -192,6 +190,7 @@ class SemanticScholarAPI(object):
'sort': "relevance",
'venues': [],
'yearFilter': yearFilter,
- }, headers=SemanticScholarAPI.headers)
- #print(resp.status_code)
+ }
+ resp = requests.post(SemanticScholarAPI.SEARCH_ENDPOINT, json=query, headers=SemanticScholarAPI.headers)
return None if resp.status_code != 200 else resp.json()
+