return unscaled poster, inlcude main poster in getMoiePosters
This commit is contained in:
parent
543df78415
commit
37bd88fa4a
1 changed files with 8 additions and 2 deletions
10
ox/imdb.py
10
ox/imdb.py
|
@ -63,6 +63,8 @@ def getMovieInfo(imdbId):
|
|||
soup = BeautifulSoup(data)
|
||||
info = dict()
|
||||
info['poster'] = findRe(data, 'name="poster".*?<img .*?src="(.*?)"')
|
||||
if info['poster'] and '_V' in info['poster']:
|
||||
info['poster']= "%s.jpg" % info['poster'].split('._V')[0]
|
||||
|
||||
for i in re.compile('<h5>(.*?):</h5>(.*?)<div class="info"', re.DOTALL).findall(data):
|
||||
title = stripTags(i[0]).strip().lower()
|
||||
|
@ -237,8 +239,12 @@ def getMovieStills(imdbId):
|
|||
return getMovieImages(imdbId, ['still_frame'])['still_frame']
|
||||
|
||||
def getMoviePosters(imdbId):
|
||||
return getMovieImages(imdbId, ['poster'])['poster']
|
||||
|
||||
posters = getMovieImages(imdbId, ['poster'])['poster']
|
||||
poster = getMoviePoster(imdbId)
|
||||
if poster:
|
||||
posters[poster] = 'main poster'
|
||||
return posters
|
||||
|
||||
def getMovieTrivia(imdbId):
|
||||
url = "%s/trivia" % getUrlBase(imdbId)
|
||||
data = getUrlUnicode(url)
|
||||
|
|
Loading…
Reference in a new issue