diff options
author | Alexandre Flament <alex@al-f.net> | 2021-12-06 21:48:53 +0100 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2021-12-06 21:49:18 +0100 |
commit | 037cb7dd3db2716d67f8eef1fb51f2ebf7b40040 (patch) | |
tree | 83be1389b7763067a0c737e75999c22f8ec880ae /searx | |
parent | e4a2d354aa4c0c97a096de47a8bcf6bb22e4d153 (diff) | |
download | searxng-037cb7dd3db2716d67f8eef1fb51f2ebf7b40040.tar.gz searxng-037cb7dd3db2716d67f8eef1fb51f2ebf7b40040.zip |
[fix] imdb: don't crash when there is no result
Diffstat (limited to 'searx')
-rw-r--r-- | searx/engines/imdb.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/imdb.py b/searx/engines/imdb.py index a3dab736d..a7474fd5b 100644 --- a/searx/engines/imdb.py +++ b/searx/engines/imdb.py @@ -57,7 +57,7 @@ def response(resp): suggestions = json.loads(resp.text) results = [] - for entry in suggestions['d']: + for entry in suggestions.get('d', []): # https://developer.imdb.com/documentation/key-concepts#imdb-ids entry_id = entry['id'] |