urls could be unicdoe
This commit is contained in:
parent
75d2757314
commit
a506de677b
1 changed files with 2 additions and 0 deletions
|
@ -46,6 +46,8 @@ def getPosters(movie_id, url_prefix='', limit=lambda x, y: 0.3 < x/y < 1):
|
||||||
return posters
|
return posters
|
||||||
|
|
||||||
def poster_path(url, filename):
|
def poster_path(url, filename):
|
||||||
|
if isinstance(url, unicode):
|
||||||
|
url = url.encode('utf-8')
|
||||||
h = hashlib.sha1(url).hexdigest()
|
h = hashlib.sha1(url).hexdigest()
|
||||||
ext = 'jpg'
|
ext = 'jpg'
|
||||||
if filename.endswith('.png'):
|
if filename.endswith('.png'):
|
||||||
|
|
Loading…
Reference in a new issue