diff --git a/ox/web/imdb.py b/ox/web/imdb.py index 7698dbf..9fcbb7d 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -925,10 +925,7 @@ def get_episodes(imdbId, season=None): def max_votes(): url = 'http://www.imdb.com/search/title?num_votes=500000,&sort=num_votes,desc' data = cache.read_url(url).decode('utf-8', 'ignore') - votes = max([ - int(v.replace(',', '')) - for v in re.compile(r'Votes.*?([\d,]+)', re.DOTALL).findall(data) - ]) + votes = int(1000000 * max([float(m) for m in re.compile(r'(\d+\.\d)M', re.DOTALL).findall(data)])) return votes def guess(title, director='', timeout=-1):