summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-12-06 21:48:53 +0100
committerAlexandre Flament <alex@al-f.net>2021-12-06 21:49:18 +0100
commit037cb7dd3db2716d67f8eef1fb51f2ebf7b40040 (patch)
tree83be1389b7763067a0c737e75999c22f8ec880ae /searx
parente4a2d354aa4c0c97a096de47a8bcf6bb22e4d153 (diff)
downloadsearxng-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.py2
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']