diff options
author | Adam Tauber <asciimoo@gmail.com> | 2020-01-02 22:29:55 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2020-01-02 22:29:55 +0100 |
commit | 1e6253ce16346fc6f439a07211b56770d06ba225 (patch) | |
tree | f7551e99d3571a8982177dce331d1b48e95e46a7 | |
parent | 86a378bd0109684bd45c917f94068e3c98441904 (diff) | |
download | searxng-1e6253ce16346fc6f439a07211b56770d06ba225.tar.gz searxng-1e6253ce16346fc6f439a07211b56770d06ba225.zip |
[fix] handle empty response
-rw-r--r-- | searx/engines/microsoft_academic.py | 2 |
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) |