python2 fix
This commit is contained in:
parent
aaf30c35a0
commit
0b9a3966b0
1 changed files with 1 additions and 1 deletions
|
@ -707,7 +707,7 @@ def get_episodes(imdbId, season=None):
|
||||||
url = 'http://www.imdb.com/title/tt%s/episodes' % imdbId
|
url = 'http://www.imdb.com/title/tt%s/episodes' % imdbId
|
||||||
if season:
|
if season:
|
||||||
url += '?season=%d' % season
|
url += '?season=%d' % season
|
||||||
data = cache.read_url(url)
|
data = cache.read_url(url).decode()
|
||||||
for e in re.compile('<div data-const="tt(\d{7})".*?>.*?<div>S(\d+), Ep(\d+)<\/div>\n<\/div>', re.DOTALL).findall(data):
|
for e in re.compile('<div data-const="tt(\d{7})".*?>.*?<div>S(\d+), Ep(\d+)<\/div>\n<\/div>', re.DOTALL).findall(data):
|
||||||
episodes['S%02dE%02d' % (int(e[1]), int(e[2]))] = e[0]
|
episodes['S%02dE%02d' % (int(e[1]), int(e[2]))] = e[0]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue