Merge pull request #588 from dalf/fix-imdb

[fix] imdb: don't crash when there is no result
This commit is contained in:
Alexandre Flament 2021-12-06 23:28:35 +01:00 committed by GitHub
commit 24c7d6300e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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']