diff options
author | Alexandre Flament <alex@al-f.net> | 2021-10-26 12:26:43 +0200 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2021-10-26 12:26:43 +0200 |
commit | 64b29ad8387179ba5fdde683ee69d845edce2ede (patch) | |
tree | b18a643eee4997759e291d8a8f5337f0f52afb09 /searx/engines | |
parent | 9fe1ee4ed964810c7de9a39ec7f865d0df96e5eb (diff) | |
download | searxng-64b29ad8387179ba5fdde683ee69d845edce2ede.tar.gz searxng-64b29ad8387179ba5fdde683ee69d845edce2ede.zip |
[mod] microsoft academic: increase timeout to 6 seconds
also avoid a crash when there is no result
close #433
Diffstat (limited to 'searx/engines')
-rw-r--r-- | searx/engines/microsoft_academic.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/microsoft_academic.py b/searx/engines/microsoft_academic.py index 82a5d3550..c99611049 100644 --- a/searx/engines/microsoft_academic.py +++ b/searx/engines/microsoft_academic.py @@ -47,7 +47,7 @@ def response(resp): if not response_data: return results - for result in response_data['pr']: + for result in response_data.get('pr', {}): if 'dn' not in result['paper']: continue |