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

windows: cannot login to crunchyroll #66

Closed dsolisp closed 6 years ago

dsolisp commented 6 years ago

D:\anime-dl\anime-dl.exe -i $url5 -u $user -p $pass

Trying to login... Unable to Log you in. Check credentials again. Traceback (most recent call last): File "anime_dl__main.py", line 18, in File "anime_dl__main__.py", line 75, in main File "anime_dl\AnimeDL.py", line 30, in init__ File "anime_dl\sites\crunchyroll.py", line 47, in init TypeError: 'NoneType' object is not iterable [9728] Failed to execute script main

worked before with no problems, I have not made changes to my system

DEBUG: You have successfully set the Debugging On. DEBUG: Arguments Provided : Namespace(input=['https://www.crunchyroll.com/one-piece/episode-126-i-will-surpass-you-rain-falls-in-alabasta-667493'], language='Japanese', password=['pass'], range='All', resolution='720p', skip=False, username=['pass'], verbose=True, version=False) DEBUG: Operating System : Windows - 10 - 10.0.17134 DEBUG: Python Version : 2.7.14 (32bit) DEBUG: Starting new HTTPS connection (1): www.crunchyroll.com DEBUG: https://www.crunchyroll.com:443 "GET /login HTTP/1.1" 503 None DEBUG: Resetting dropped connection: www.crunchyroll.com DEBUG: https://www.crunchyroll.com:443 "GET /cdn-cgi/l/chk_jschl?jschl_answer=32.9042304363&jschl_vc=b5c21401a2d760507399b21aee202603&pass=1538445613.532-85emheqfct HTTP/1.1" 302 159 DEBUG: https://www.crunchyroll.com:443 "GET /login HTTP/1.1" 200 None DEBUG: https://www.crunchyroll.com:443 "POST /login HTTP/1.1" 302 None DEBUG: https://www.crunchyroll.com:443 "GET / HTTP/1.1" 200 None

Thedarklife74 commented 6 years ago

same problem

Thedarklife74 commented 6 years ago

I think its because of the new player ...

dsolisp commented 6 years ago

yeah, because the html5, I see they implemented worldwide

Thedarklife74 commented 6 years ago

Ok I found I semi-automatised solution by myself

axipher commented 6 years ago

Also having the same problem, same error and line numbers.

Ok I found I semi-automatised solution by myself

What was your solution, can you please share

Thedarklife74 commented 6 years ago

Also having the same problem, same error and line numbers.

Ok I found I semi-automatised solution by myself

What was your solution, can you please share

So. For the video you need to use an extension like flash video downloader or download helper to get the video link of the m3u8. With the link m3u8 use ffmpeg to get it in mp4. For the subtitle when you play the video on the website use the insepctor tool of your browser and apply a filter to show txt file who are loaded. On of the 3 are the subtitle open it in a new tab and save the page as an .ass. Then you just need to rename your .mp4 in .mkv and merge with the subtitle. I already send this solution to the creator of this project to helping him to update but no reponse yet so ...

axipher commented 6 years ago

Okay, I'll have to figure that out later, thank though. I checked in Firefox and it doesn't seem to have a way to see the downloaded subtitles file that I can tell.

axipher commented 6 years ago

I just checked and the Crunchyroll-Downloader by skid9000 that uses his CrunchyrollAuth code seems to work perfectly fine still. So not sure if it might be an option to switch to that Login code or not. I'm still pretty green in Python so I don't feel comfortable mucking around the code.

Thedarklife74 commented 6 years ago

I just checked and the Crunchyroll-Downloader by skid9000 that uses his CrunchyrollAuth code seems to work perfectly fine still. So not sure if it might be an option to switch to that Login code or not. I'm still pretty green in Python so I don't feel comfortable mucking around the code.

OK thanks i check that in few hours

Barbait commented 6 years ago

same problem for me

leptoid commented 6 years ago

I just checked and the Crunchyroll-Downloader by skid9000 that uses his CrunchyrollAuth code seems to work perfectly fine still. So not sure if it might be an option to switch to that Login code or not. I'm still pretty green in Python so I don't feel comfortable mucking around the code.

If only it did episode ranges and subcategorized videos into respective show folders. Thus, I feel anime-dl is superior, you know... when the login isn't broken. :)

axipher commented 6 years ago

I just checked and the Crunchyroll-Downloader by skid9000 that uses his CrunchyrollAuth code seems to work perfectly fine still. So not sure if it might be an option to switch to that Login code or not. I'm still pretty green in Python so I don't feel comfortable mucking around the code.

If only it did episode ranges and subcategorized videos into respective show folders. Thus, I feel anime-dl is superior, you know... when the login isn't broken. :)

I tried to take a quick look through Xonshiz's code, I think he's using portions of the youtube-dl code instead of the actual youtube-dl executable itself. I'm sure if I spent more time looking I might be able to figure out what's going on, but maybe the cookies.txt that gets generated by Crunchyroll-Auth (or by running Crunchyroll-Downloader once and checking in ProgramData), we can pass that cookies.txt to anime-dl to bypass the login issue.

I do agree that I much prefer anime-dl as it seperates downloads by show name along with adding the resolution to the filenames.

Xonshiz commented 6 years ago

I have included a very quick, dirty and a hacky fix for this issue. Fetch the latest Push or the released binary. It's working on my end, please confirm it on yours as well. I'll make a better fix later. I'll be closing this for now. Feel free to re-open if the new one fails.

Xonshiz commented 6 years ago

Adding onto the information you all have gathered, I think the issue is within the login page. Anime-dl checks "Redirecting...." in the title. At least it used to, because Crunchyroll had an intermediate page after successfull sign in. This is what I used to find whether the user has logged in or not. Apparently, they've changed this and removed that page. But, they've added some other page.

Unfortunately, I don't have a premium account now and my account has expired. So, I tried wit ha trial account and they DO have a new page in between. I'm not planning on getting a subscription anytime soon. I'll see what can be done.

About the player thing, they might've changed things, but the script works, so meh. Let it be. I have to change the complete script anyway. I'll look into that later.

For now, please have fun with this one.

Thedarklife74 commented 6 years ago

Hi ! I juste test now but it seems it doesn't work (I have a premium account)

DEBUG: You have successfully set the Debugging On. DEBUG: Arguments Provided : Namespace(input=['https://www.crunchyroll.com/that-time-i-got-reincarnated-as-a-slime/episode-2-meeting-the-goblins-777520'], language='Japanese', password=['xxxxxxx'], range='All', resolution=['720'], skip=False, username=['xxxxx'], verbose=True, version=False) DEBUG: Operating System : Windows - 10 - 10.0.17763 DEBUG: Python Version : 2.7.14 (32bit) DEBUG: Starting new HTTPS connection (1): www.crunchyroll.com DEBUG: https://www.crunchyroll.com:443 "GET /login HTTP/1.1" 503 None DEBUG: Resetting dropped connection: www.crunchyroll.com DEBUG: https://www.crunchyroll.com:443 "GET /cdn-cgi/l/chk_jschl?jschl_answer=157.4918906686&jschl_vc=f5c1400b4e53cd8dd0d221a9b60cd133&pass=1539208221.237-J4Xe3VFJmn HTTP/1.1" 302 159 DEBUG: https://www.crunchyroll.com:443 "GET /login HTTP/1.1" 200 None DEBUG: https://www.crunchyroll.com:443 "POST /login HTTP/1.1" 302 None DEBUG: https://www.crunchyroll.com:443 "GET / HTTP/1.1" 200 None

Thedarklife74 commented 6 years ago

My bad I will try with a clean install and test

Thedarklife74 commented 6 years ago

Ok I just fogot to update the .exe now I can confirm It work well ;) Thanks a lot !