urls could be unicdoe

This commit is contained in:
j 2012-10-01 00:33:11 +02:00
parent 75d2757314
commit a506de677b

View file

@ -46,6 +46,8 @@ def getPosters(movie_id, url_prefix='', limit=lambda x, y: 0.3 < x/y < 1):
return posters
def poster_path(url, filename):
if isinstance(url, unicode):
url = url.encode('utf-8')
h = hashlib.sha1(url).hexdigest()
ext = 'jpg'
if filename.endswith('.png'):