fix so that we can deal with imdb movies without poster
This commit is contained in:
parent
71c05404af
commit
5f0deef482
@ -41,6 +41,10 @@ def imdbid(imdbid):
|
|||||||
img = get(poster)
|
img = get(poster)
|
||||||
if img.status_code == 200:
|
if img.status_code == 200:
|
||||||
movie["poster"] = posters.save(poster, img.content)
|
movie["poster"] = posters.save(poster, img.content)
|
||||||
|
else:
|
||||||
|
movie["poster"] = None
|
||||||
|
else:
|
||||||
|
movie["poster"] = None
|
||||||
return movie
|
return movie
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user