return unscaled poster, inlcude main poster in getMoiePosters

This commit is contained in:
j 2008-05-10 10:29:15 +02:00
parent 543df78415
commit 37bd88fa4a

View file

@ -63,6 +63,8 @@ def getMovieInfo(imdbId):
soup = BeautifulSoup(data) soup = BeautifulSoup(data)
info = dict() info = dict()
info['poster'] = findRe(data, 'name="poster".*?<img .*?src="(.*?)"') 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): for i in re.compile('<h5>(.*?):</h5>(.*?)<div class="info"', re.DOTALL).findall(data):
title = stripTags(i[0]).strip().lower() title = stripTags(i[0]).strip().lower()
@ -237,8 +239,12 @@ def getMovieStills(imdbId):
return getMovieImages(imdbId, ['still_frame'])['still_frame'] return getMovieImages(imdbId, ['still_frame'])['still_frame']
def getMoviePosters(imdbId): 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): def getMovieTrivia(imdbId):
url = "%s/trivia" % getUrlBase(imdbId) url = "%s/trivia" % getUrlBase(imdbId)
data = getUrlUnicode(url) data = getUrlUnicode(url)