diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-02-10 16:53:29 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-02-10 16:53:29 +0100 |
| commit | 478903401f480f2284f8f534ac5ef9b99fdc0b1c (patch) | |
| tree | 5d3d85e92f3981f2dcb46d9822f96bd712f6ad03 /scraper/s2.py | |
| parent | e6004394a3cf47fb1514955b9a4dc283268a28ae (diff) | |
timeouts
Diffstat (limited to 'scraper/s2.py')
| -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: |
