From 037cb7dd3db2716d67f8eef1fb51f2ebf7b40040 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Mon, 6 Dec 2021 21:48:53 +0100 Subject: [PATCH] [fix] imdb: don't crash when there is no result --- searx/engines/imdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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']