From 5f0deef482b9f992cd506f3bebb66303acff97b8 Mon Sep 17 00:00:00 2001 From: bartholin Date: Sun, 13 Oct 2024 16:26:41 +0200 Subject: [PATCH] fix so that we can deal with imdb movies without poster --- kinolist/imdb.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kinolist/imdb.py b/kinolist/imdb.py index e392bec..8984b5c 100644 --- a/kinolist/imdb.py +++ b/kinolist/imdb.py @@ -41,6 +41,10 @@ def imdbid(imdbid): img = get(poster) if img.status_code == 200: movie["poster"] = posters.save(poster, img.content) + else: + movie["poster"] = None + else: + movie["poster"] = None return movie else: return None