From 832aeb848d1308d6b97303316e1fd72f0acff757 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 8 Jan 2010 12:37:37 +0100 Subject: [PATCH] imdb is changing --- oxweb/imdb.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/oxweb/imdb.py b/oxweb/imdb.py index c70b418..6ac7b20 100644 --- a/oxweb/imdb.py +++ b/oxweb/imdb.py @@ -595,9 +595,15 @@ class IMDb: IMDbDict['title'] = getMovieTitle(self.imdb) #Rating + #FIXME: in the future this could be just: + #m = findRe('(.*?)', data) m = re.compile('(.*?)/10', 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