diff options
| -rw-r--r-- | scraper/s2.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scraper/s2.py b/scraper/s2.py index b1b9742c..01c0b4d5 100644 --- a/scraper/s2.py +++ b/scraper/s2.py @@ -125,7 +125,7 @@ class SemanticScholarAPI(object): @staticmethod def fetch_file(url, fn, **kwargs): try: - resp = requests.get(url, params=kwargs, headers=SemanticScholarAPI.headers, verify=False) + resp = requests.get(url, params=kwargs, headers=SemanticScholarAPI.headers, verify=False, timeout=10) if resp.status_code != 200: return None except: @@ -141,7 +141,7 @@ class SemanticScholarAPI(object): @staticmethod def fetch_doi(url, fn, **kwargs): try: - resp = requests.get(url, params=kwargs, headers=SemanticScholarAPI.headers, verify=False) + resp = requests.get(url, params=kwargs, headers=SemanticScholarAPI.headers, verify=False, timeout=10) if resp.status_code != 200: return None, None except: |
