Xonshiz / anime-dl

Anime-dl is a command-line program to download anime from CrunchyRoll and Funimation.
MIT License
229 stars 37 forks source link

NoneType' object has no attribute 'group #109

Open Thedarklife74 opened 4 years ago

Thedarklife74 commented 4 years ago

Hi i've got this problem today

Trying to login... Logged in successfully... Seems like this video isn't available... 'NoneType' object has no attribute 'group'

My account is okay and the video exist

Thedarklife74 commented 4 years ago

Trying to login... Logged in successfully... Traceback (most recent call last): File "anime_dl__main.py", line 16, in File "anime_dl__main.py", line 73, in Main File "anime_dl\Anime_dl.py", line 30, in init__ File "anime_dl\sites\crunchyroll.py", line 42, in init File "anime_dl\sites\crunchyroll.py", line 65, in single_episode File "anime_dl\sites\crunchyroll.py", line 425, in m3u8_finder AttributeError: 'NoneType' object has no attribute 'group' [15980] Failed to execute script main__

Thedarklife74 commented 4 years ago

Any Workaround ? Still not working

iiEpic commented 4 years ago

What are you trying to download exactly? Please paste the actual command you are typing in please.

Please remove your email and password before doing so!

Thedarklife74 commented 4 years ago

What are you trying to download exactly? Please paste the actual command you are typing in please.

Please remove your email and password before doing so!

@echo off set /p lien= Enter link : echo %lien% pause anime-dl.exe -i "%lien%" -u "user" -p "password" -r "720" -v pause

I precise i always use that for years now and i don't work anymore since 6days. I think it's more a backend change from Crunchyroll who cause the problem.

iiEpic commented 4 years ago

I'm using it and I'm not having a problem atm. What anime are you trying to download?

Thedarklife74 commented 4 years ago

I'm using it and I'm not having a problem atm. What anime are you trying to download?

Nothing precize, i try multiple episode on Crunchyroll and it doing the same error

I have the very last update of the script and Binaries

iiEpic commented 4 years ago

I just did "./main.py -i https://www.crunchyroll.com/welcome-to-demon-school-iruma-kun -u me -p pass -r 480 -o /home/anime/myshow/"

It downloaded my videos fine. Are you sure you got everything updated? Just curious is all.

Thedarklife74 commented 4 years ago

I just did "./main.py -i https://www.crunchyroll.com/welcome-to-demon-school-iruma-kun -u me -p pass -r 480 -o /home/anime/myshow/

It downloaded my videos fine. Are you sure you got everything updated? Just curious is all.

I tried it work only with no premium episodes. BUT my account is okay and subscribed ( I can read premium video on the website)

iiEpic commented 4 years ago

Wait a second.. I just realized you're using windows.. My apologies. I have not a clue what your error could be then.. Let me do some looking because I use Linux to do my dirty work.

iiEpic commented 4 years ago

I'm pretty sure the anime_dl.exe is out dated...

Thedarklife74 commented 4 years ago

I'm pretty sure the anime_dl.exe is out dated...

Mine is dating from January 2019, I try with the last one on the projet and is not even able to login so ...

iiEpic commented 4 years ago

It's the anime_dl.exe. Give me a minute to compile a new one and I'll post it here for you.

iiEpic commented 4 years ago

I've compiled it multiple times with the newest stuff and it's just not working.. I think I know what the issue is so I'll see if I can fix it but below is the issue I'm getting.

Traceback (most recent call last): File "anime_dl\__main__.py", line 22, in <module> class Main(): File "anime_dl\__main__.py", line 82, in Main logger=logger, episode_range=args.range, output=args.output) File "anime_dl\Anime_dl.py", line 30, in __init__ skipper=skipper, logger=logger, episode_range=episode_range, output=output) File "anime_dl\sites\crunchyroll.py", line 36, in __init__ File "anime_dl\common\browser_instance.py", line 76, in login_crunchyroll File "anime_dl\common\browser_instance.py", line 92, in login_check TypeError: a bytes-like object is required, not 'str' [26508] Failed to execute script __main__

iiEpic commented 4 years ago

Fixed-2020-01-01.zip Here is a temp fix, it worked for me on my Windows Machine. Let me know if it works for you! @Thedarklife74

Thedarklife74 commented 4 years ago

Fixed-2020-01-01.zip Here is a temp fix, it worked for me on my Windows Machine. Let me know if it works for you! @Thedarklife74

Same problem.

Trying to login... Let me check again... Unable to Log you in. Check credentials again. Failed Login!!! Traceback (most recent call last): File "anime_dl__main.py", line 22, in class Main(): File "anime_dl__main__.py", line 82, in Main logger=logger, episode_range=args.range, output=args.output) File "anime_dl\Anime_dl.py", line 30, in init__ skipper=skipper, logger=logger, episode_range=episode_range, output=output) File "anime_dl\sites\crunchyroll.py", line 49, in init NameError: name 'exit' is not defined [10672] Failed to execute script main

Thedarklife74 commented 4 years ago

@Xonshiz Any ideas ?

Thedarklife74 commented 4 years ago

I tried wit a complete fresh install with no .exe and use only python, here are the logs

Trying to login... Traceback (most recent call last): File "main.py", line 22, in class Main(): File "main.py", line 80, in Main AnimeDL(url=args.input, username=args.username, password=args.password, File "anime_dl\Anime_dl.py", line 28, in init sites.crunchyroll.Crunchyroll( File "\anime_dl\sites\crunchyroll.py", line 33, in init login_response, cookies, token = anime_dl.common.browser_instance.login_crunchyroll(url=url, File "\anime_dl\common\browser_instance.py", line 76, in login_crunchyroll login_check_response, login_cookies = login_check(html_source=login_post.text.encode('utf-8'), cookies=login_post.cookies) File "\anime_dl\common\browser_instance.py", line 92, in login_check if "href=\"/logout\"" in html_source: TypeError: a bytes-like object is required, not 'str'

And here the comand :

@echo off set /p lien= Enter link : pause python main.py -i "%lien%" -u "user" -p "pass" -r "720" -v pause

axipher commented 4 years ago

What version of Python are you running, I can't remember if I was having issues with Python3 or Python2 not working with the current code base.

Thedarklife74 commented 4 years ago

What version of Python are you running, I can't remember if I was having issues with Python3 or Python2 not working with the current code base.

Python 3.8.0

axipher commented 4 years ago

I just got home and checked quickly and an older copy of the anime-dl code I have only runs correctly using Python 2.7.17.

I don't have all the extras installed for Python3 like cfscrape and all the other pre-requiresites. I'm pretty sure this Linux box was rebuilt with only the working things I needed for a web-server and anime download server.

It might be a pain, but I would recommend trying Python 2.7.17. If that works, then awesome, otherwise I can't remember if 3.6 -> 3.7 > 3.8 have any differences that would affect the anime-dl Python code.

iiEpic commented 4 years ago

I have Python3.7 and I'm not having any problems at the moment with the current code I gave above. :(

Thedarklife74 commented 4 years ago

I have Python3.7 and I'm not having any problems at the moment with the current code I gave above. :(

Ok I uninstall Python 3.8 and install python 3.7

Official release of the scripti : Don't work (missing modules) Release by @EpicUnknown : Work perfectly

Very weird problem because i have 2 computer where I've didn't change anything and the script stopping working one day so ..... quite weird

Thedarklife74 commented 4 years ago

@EpicUnknown I donwload the update who @Xonshiz done and the exe you gave me doesn't work anymore ...

Trying to login... Let me check again... Unable to Log you in. Check credentials again. Failed Login!!! Traceback (most recent call last): File "anime_dl__main.py", line 22, in class Main(): File "anime_dl__main__.py", line 82, in Main logger=logger, episode_range=args.range, output=args.output) File "anime_dl\Anime_dl.py", line 30, in init__ skipper=skipper, logger=logger, episode_range=episode_range, output=output) File "anime_dl\sites\crunchyroll.py", line 49, in init NameError: name 'exit' is not defined [14076] Failed to execute script main

Thedarklife74 commented 4 years ago

I still have the following problem with all last updates :

Trying to login...
Logged in successfully...
Traceback (most recent call last):
  File "anime_dl\__main__.py", line 16, in <module>
  File "anime_dl\__main__.py", line 73, in Main
  File "anime_dl\Anime_dl.py", line 30, in __init__
  File "anime_dl\sites\crunchyroll.py", line 42, in __init__
  File "anime_dl\sites\crunchyroll.py", line 65, in single_episode
  File "anime_dl\sites\crunchyroll.py", line 425, in m3u8_finder
AttributeError: 'NoneType' object has no attribute 'group'
[2560] Failed to execute script __main__
iiEpic commented 4 years ago

I'll check it out tonight but I didn't have any problems with my latest build and I even upgrading to Python 3.8. I'll reply again when I take a look.

arbarbosa1979 commented 4 years ago

@EpicUnknown Did you manage to find out something about this error??

Trying to login...
Logged in successfully...
Traceback (most recent call last):
  File "anime_dl\__main__.py", line 22, in <module>
    class Main():
  File "anime_dl\__main__.py", line 82, in Main
    logger=logger, episode_range=args.range, output=args.output)
  File "anime_dl\Anime_dl.py", line 30, in __init__
    skipper=skipper, logger=logger, episode_range=episode_range, output=output)
  File "anime_dl\sites\crunchyroll.py", line 44, in __init__
    self.whole_show(url=url, cookie=cookies, token=token, language=language, resolution=resolution, skipper=skipper, episode_range=episode_range, output=output)
  File "anime_dl\sites\crunchyroll.py", line 127, in whole_show
    dub_list, ep_sub_list = self.episode_list_extractor(page_source=page_source, url=url)
  File "anime_dl\sites\crunchyroll.py", line 185, in episode_list_extractor
    if "(Dub)" in u' '.join(title_value).encode('utf-8').strip():
TypeError: a bytes-like object is required, not 'str'
[7088] Failed to execute script __main__
iiEpic commented 4 years ago

@EpicUnknown Did you manage to find out something about this error??

Trying to login...
Logged in successfully...
Traceback (most recent call last):
  File "anime_dl\__main__.py", line 22, in <module>
    class Main():
  File "anime_dl\__main__.py", line 82, in Main
    logger=logger, episode_range=args.range, output=args.output)
  File "anime_dl\Anime_dl.py", line 30, in __init__
    skipper=skipper, logger=logger, episode_range=episode_range, output=output)
  File "anime_dl\sites\crunchyroll.py", line 44, in __init__
    self.whole_show(url=url, cookie=cookies, token=token, language=language, resolution=resolution, skipper=skipper, episode_range=episode_range, output=output)
  File "anime_dl\sites\crunchyroll.py", line 127, in whole_show
    dub_list, ep_sub_list = self.episode_list_extractor(page_source=page_source, url=url)
  File "anime_dl\sites\crunchyroll.py", line 185, in episode_list_extractor
    if "(Dub)" in u' '.join(title_value).encode('utf-8').strip():
TypeError: a bytes-like object is required, not 'str'
[7088] Failed to execute script __main__

I sure did! It's a very simple fix and I apologize for not posting about it earlier. So the script SHOULD check if "title_value" is a byte like object or a regular string.

Because it is needed to be a byte like object for the anime you are downloading, simply make "(Dub)" now b'Dub' and yes that b needs to be in front of the single quotes, not inside.

Quick Edit: Line 185 of crunchyroll.py inside the sites folder ;) sorry

Happy coding and let me know if it fixes it for you! :)