imdb is changing

This commit is contained in:
j 2010-01-08 12:37:37 +01:00
parent d3069d43c6
commit 832aeb848d
1 changed files with 7 additions and 1 deletions

View File

@ -595,9 +595,15 @@ class IMDb:
IMDbDict['title'] = getMovieTitle(self.imdb)
#Rating
#FIXME: in the future this could be just:
#m = findRe('<span id="voteuser">(.*?)</span>', data)
m = re.compile('<b>(.*?)/10</b>', re.IGNORECASE).search(data)
if m:
IMDbDict['rating'] = int(float(m.group(1)) * 1000)
r = stripTags(m.group(1))
if r:
IMDbDict['rating'] = int(float(r) * 1000)
else:
IMDbDict['rating'] = -1
else:
IMDbDict['rating'] = -1
#Votes