Merge pull request #111 from EpicUnknown/master

Fixed Issue #109
master
Dhruv Kanojia (Xonshiz) 2020-01-05 10:03:38 +05:30 committed by GitHub
commit 0a0b864540
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ def login_check(html_source, cookies=None):
print("Let me check again...")
second_try_response, html_source, cookies = page_downloader(url="https://www.crunchyroll.com/", cookies=cookies)
if second_try_response:
if "href=\"/logout\"" in html_source:
if b'href=\"/logout\"' in html_source:
return True, cookies
else:
return False, cookies

View File

@ -206,7 +206,7 @@ class Crunchyroll(object):
def episode_information_extractor(self, page_source, resolution_to_find):
anime_name = re.sub(r'[^A-Za-z0-9\ \-\' \\]+', '', str(re.search(r'<series_title>(.*?)</series_title>', page_source).group(1))).title().strip()
episode_number = re.search(r'<episode_number>(.*?)</episode_number>', page_source.decode("utf-8")).group(1)
episode_number = re.search(r'<episode_number>(.*?)</episode_number>', page_source).group(1)
video_width, video_height = resolution_to_find.split("x")
video_resolution = str(video_width) + "x" + str(video_height)