From 7be1991f483802a5d792f26f1903a1cb5c77083f Mon Sep 17 00:00:00 2001 From: _iEpic Date: Wed, 1 Jan 2020 22:24:15 -0500 Subject: [PATCH] Fixed Issue #109 - Removed ".decode" on line 209 in file crunchyroll.py - Added " b' " on line 98 in file browser_instance.py --- anime_dl/common/browser_instance.py | 2 +- anime_dl/sites/crunchyroll.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/anime_dl/common/browser_instance.py b/anime_dl/common/browser_instance.py index e6c7501..5ead8b0 100644 --- a/anime_dl/common/browser_instance.py +++ b/anime_dl/common/browser_instance.py @@ -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 diff --git a/anime_dl/sites/crunchyroll.py b/anime_dl/sites/crunchyroll.py index 7829065..b37719b 100644 --- a/anime_dl/sites/crunchyroll.py +++ b/anime_dl/sites/crunchyroll.py @@ -206,7 +206,7 @@ def sub_list_editor(self, episode_range, ep_sub_list): def episode_information_extractor(self, page_source, resolution_to_find): anime_name = re.sub(r'[^A-Za-z0-9\ \-\' \\]+', '', str(re.search(r'(.*?)', page_source).group(1))).title().strip() - episode_number = re.search(r'(.*?)', page_source.decode("utf-8")).group(1) + episode_number = re.search(r'(.*?)', page_source).group(1) video_width, video_height = resolution_to_find.split("x") video_resolution = str(video_width) + "x" + str(video_height)