anime-dl icon indicating copy to clipboard operation
anime-dl copied to clipboard

NoneType' object has no attribute 'group

Open Thedarklife74 opened this issue 5 years ago • 27 comments

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 avatar Dec 26 '19 16:12 Thedarklife74

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 avatar Dec 29 '19 18:12 Thedarklife74

Any Workaround ? Still not working

Thedarklife74 avatar Jan 01 '20 23:01 Thedarklife74

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!

iiEpic avatar Jan 02 '20 02:01 iiEpic

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.

Thedarklife74 avatar Jan 02 '20 02:01 Thedarklife74

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

iiEpic avatar Jan 02 '20 02:01 iiEpic

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

Thedarklife74 avatar Jan 02 '20 02:01 Thedarklife74

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.

iiEpic avatar Jan 02 '20 02:01 iiEpic

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)

Thedarklife74 avatar Jan 02 '20 02:01 Thedarklife74

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 avatar Jan 02 '20 02:01 iiEpic

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

iiEpic avatar Jan 02 '20 02:01 iiEpic

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 ...

Thedarklife74 avatar Jan 02 '20 02:01 Thedarklife74

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

iiEpic avatar Jan 02 '20 02:01 iiEpic

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 avatar Jan 02 '20 03:01 iiEpic

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

iiEpic avatar Jan 02 '20 03:01 iiEpic

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 avatar Jan 02 '20 03:01 Thedarklife74

@Xonshiz Any ideas ?

Thedarklife74 avatar Jan 03 '20 17:01 Thedarklife74

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

Thedarklife74 avatar Jan 03 '20 20:01 Thedarklife74

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.

axipher avatar Jan 03 '20 22:01 axipher

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

Thedarklife74 avatar Jan 03 '20 22:01 Thedarklife74

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.

axipher avatar Jan 03 '20 23:01 axipher

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

iiEpic avatar Jan 04 '20 01:01 iiEpic

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 avatar Jan 04 '20 18:01 Thedarklife74

@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 avatar Jan 06 '20 22:01 Thedarklife74

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__

Thedarklife74 avatar Jan 10 '20 01:01 Thedarklife74

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.

iiEpic avatar Jan 10 '20 01:01 iiEpic

@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__

arbarbosa1979 avatar Feb 07 '20 23:02 arbarbosa1979

@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! :)

iiEpic avatar Feb 09 '20 02:02 iiEpic