Compare commits

...

6 Commits

Author SHA1 Message Date
Dhruv Kanojia (Xonshiz) d40f0ca11b
Merge pull request #121 from lfals/BF-01
Error Exit not defined
2021-10-16 07:47:29 +05:30
Luis Amorim 256f082ce0 Error Exit not defined 2021-10-15 15:24:38 -03:00
Xonshiz f17350d835 Follow up fix for #111
Follow up fix for #111
2020-01-05 23:05:33 -05:00
Dhruv Kanojia (Xonshiz) 0a0b864540
Merge pull request #111 from EpicUnknown/master
Fixed Issue #109
2020-01-05 10:03:38 +05:30
_iEpic 7be1991f48 Fixed Issue #109
- Removed ".decode" on line 209 in file crunchyroll.py
- Added " b' " on line 98 in file browser_instance.py
2020-01-01 22:24:15 -05:00
Dhruv Kanojia (Xonshiz) 8f9b2fa0f1
Merge pull request #107 from EpicUnknown/master
Multiple little fixes
2019-11-25 07:59:09 +05:30
2 changed files with 4 additions and 4 deletions

View File

@ -89,13 +89,13 @@ def login_crunchyroll(url, username, password, country):
def login_check(html_source, cookies=None):
# Open the page and check the title. CrunchyRoll redirects the user and the title has the text "Redirecting...".
# If this is not found, you're probably not logged in and you'll just get 360p or 480p.
if "href=\"/logout\"" in html_source:
if b'href="/logout"' in html_source:
return True, cookies
else:
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

@ -9,7 +9,7 @@ import os
import subprocess
from glob import glob
from shutil import move
from sys import exit
class Crunchyroll(object):
def __init__(self, url, password, username, resolution, language, skipper, logger, episode_range, output):
@ -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)