get poster
This commit is contained in:
parent
a09dfe5d4d
commit
4b1fd064f2
1 changed files with 4 additions and 4 deletions
|
@ -180,7 +180,7 @@ class Imdb(SiteParser):
|
|||
},
|
||||
'posterId': {
|
||||
'page': 'combined',
|
||||
're': '/primary-photo/media/rm(.*?)/tt',
|
||||
're': '<img.*?id="primary-poster".*?src="(.*?)".*?>',
|
||||
'type': 'string'
|
||||
},
|
||||
'posterIds': {
|
||||
|
@ -813,9 +813,9 @@ def get_movie_poster(imdbId):
|
|||
'''
|
||||
info = ImdbCombined(imdbId)
|
||||
if 'posterId' in info:
|
||||
url = "http://www.imdb.com/media/rm%s/tt%s" % (info['posterId'], imdbId)
|
||||
data = read_url(url).decode('utf-8', 'ignore')
|
||||
poster = find_re(data, 'img.*?id="primary-img".*?src="(.*?)"')
|
||||
poster = info['posterId']
|
||||
if '@' in poster:
|
||||
poster = poster.split('@')[0] + '@.jpg'
|
||||
return poster
|
||||
elif 'series' in info:
|
||||
return get_movie_poster(info['series'])
|
||||
|
|
Loading…
Reference in a new issue