summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2020-01-02 22:29:55 +0100
committerAdam Tauber <asciimoo@gmail.com>2020-01-02 22:29:55 +0100
commit1e6253ce16346fc6f439a07211b56770d06ba225 (patch)
treef7551e99d3571a8982177dce331d1b48e95e46a7 /searx/engines
parent86a378bd0109684bd45c917f94068e3c98441904 (diff)
downloadsearxng-1e6253ce16346fc6f439a07211b56770d06ba225.tar.gz
searxng-1e6253ce16346fc6f439a07211b56770d06ba225.zip
[fix] handle empty response
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/microsoft_academic.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/engines/microsoft_academic.py b/searx/engines/microsoft_academic.py
index 9387b08d0..9bac0069c 100644
--- a/searx/engines/microsoft_academic.py
+++ b/searx/engines/microsoft_academic.py
@@ -45,6 +45,8 @@ def request(query, params):
def response(resp):
results = []
response_data = loads(resp.text)
+ if not response_data:
+ return results
for result in response_data['results']:
url = _get_url(result)