From 9fab130d8127cf87c442a2c14aae0fc8bd04578b Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 31 May 2009 20:12:43 +0200 Subject: [PATCH] fix votes in IMDb --- oxweb/imdb.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/oxweb/imdb.py b/oxweb/imdb.py index 47c50c5..53393d2 100644 --- a/oxweb/imdb.py +++ b/oxweb/imdb.py @@ -565,6 +565,7 @@ class IMDb: def parse(self): data = self.getPage() IMDbDict ={} + info = getMovieInfo(self.imdb) #Poster IMDbDict['poster'] = getMoviePoster(self.imdb) if not IMDbDict['poster']: @@ -580,11 +581,7 @@ class IMDb: else: IMDbDict['rating'] = -1 #Votes - m = re.compile('\((.*?) votes\)', re.IGNORECASE).findall(data) - if m: - IMDbDict['votes'] = int(m[0].replace(',', '')) - else: - IMDbDict['votes'] = -1 + IMDbDict['votes'] = info['votes'] data = data.replace('\n',' ') #some values