python3 fixes
This commit is contained in:
parent
a7fe2e2f96
commit
3e9a7c2e5f
2 changed files with 3 additions and 3 deletions
|
@ -802,7 +802,7 @@ def get_episodes(imdbId, season=None):
|
||||||
|
|
||||||
def max_votes():
|
def max_votes():
|
||||||
url = 'http://www.imdb.com/search/title?num_votes=500000,&sort=num_votes,desc'
|
url = 'http://www.imdb.com/search/title?num_votes=500000,&sort=num_votes,desc'
|
||||||
data = cache.read_url(url)
|
data = cache.read_url(url).decode('utf-8', 'ignore')
|
||||||
votes = max([
|
votes = max([
|
||||||
int(v.replace(',', ''))
|
int(v.replace(',', ''))
|
||||||
for v in re.compile('<span name="nv" data-value="(\d+)"').findall(data)
|
for v in re.compile('<span name="nv" data-value="(\d+)"').findall(data)
|
||||||
|
|
|
@ -116,7 +116,7 @@ def get_movie_data(wikipedia_url):
|
||||||
|
|
||||||
def get_image_url(name):
|
def get_image_url(name):
|
||||||
url = 'http://en.wikipedia.org/wiki/Image:' + name.replace(' ', '%20')
|
url = 'http://en.wikipedia.org/wiki/Image:' + name.replace(' ', '%20')
|
||||||
data = read_url(url)
|
data = read_url(url).decode('utf-8')
|
||||||
url = find_re(data, 'href="(http://upload.wikimedia.org/.*?)"')
|
url = find_re(data, 'href="(http://upload.wikimedia.org/.*?)"')
|
||||||
if not url:
|
if not url:
|
||||||
url = find_re(data, 'href="(//upload.wikimedia.org/.*?)"')
|
url = find_re(data, 'href="(//upload.wikimedia.org/.*?)"')
|
||||||
|
|
Loading…
Reference in a new issue