fix max votes estiamte
This commit is contained in:
parent
41edea1862
commit
02458e86ec
1 changed files with 1 additions and 4 deletions
|
@ -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</span>.*?([\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):
|
||||
|
|
Loading…
Reference in a new issue