imdb is changing

This commit is contained in:
j 2010-01-08 12:37:37 +01:00
parent d3069d43c6
commit 832aeb848d

View file

@ -595,9 +595,15 @@ class IMDb:
IMDbDict['title'] = getMovieTitle(self.imdb) IMDbDict['title'] = getMovieTitle(self.imdb)
#Rating #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) m = re.compile('<b>(.*?)/10</b>', re.IGNORECASE).search(data)
if m: 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: else:
IMDbDict['rating'] = -1 IMDbDict['rating'] = -1
#Votes #Votes