Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[Crunchyroll] ERROR: Wrong login info: HTTP Error 302: The HTTP server returned a redirect error that would lead to an infinite loop. #17190
Comments
|
The reason is the lack of the |
|
Getting this error on version 2018.08.04 |
|
Getting this error on version 2018.09.26 |
|
Getting this error on version 2018.10.05 |
|
Please only contribute in this thread (don't just issue bump) please! Known working workaround: Supply a cookies file rather than having Youtube-DL login for you. This seems to work until the script can be fixed to login properly. Anyways I did some digging on this issue. It looks like the issue is here during the CrunchyRoll login. crunchyroll.py -- Line 59-67 def _login(self):
username, password = self._get_login_info()
if username is None:
return
self._download_webpage(
'https://www.crunchyroll.com/?a=formhandler',
None, 'Logging in', 'Wrong login info',
data=urlencode_postdata({
'formname': 'RpcApiUser_Login',
'next_url': 'https://www.crunchyroll.com/acct/membership',
'name': username,
'password': password,
}))When I attempt to run that url manually even the browser shows 302 redirects happening in a loop which it eventually halts. This looks like a change on CrunchyRoll ends for how the authentication should be happening. What I'm not understanding is why it works fine for Windows and not on Linux since authentication would be happening the same way for both. Changing the parameters doesn't seem to work... yet. Watching headers shows the login form is posting the following parameters back to itself (I think). As of right now changing the parameters at the function noted above stops the 302 loop but also doesn't login successfully. EDIT: Fixed and changed the post url to https://www.crunchyroll.com/login and now getting 503 which means CloudFlare is getting in the way. EDIT2: Implemented cfscrape as per a pull request for testing but it is still failing so I'm doing something wrong. I don't know what. As of right now documentation doesn't build but I'm just doing |
|
@shinji257 You use BTW:
|
Yea.... I thought about that and I still need to figure things out on that. As mentioned later on it is ideal that we grab everything in one go otherwise I believe that is one reason why login isn't working.
This is very much a work in progress. For RpcApiUser_Login I found that the method is what was causing the 302 loop to happen. Even in a browser when I try to push it through it fails to do so. If we can figure out why it fails like this for some people then that would probably be a better route anyways. Who knows... maybe I'm off the mark here and the issue actually lies elsewhere. I do wonder if there is a better way. Currently cfscrape breaks one of the documentation build steps in the Makefile for unknown reasons so I'll probably go back and investigate another way to deal with this.
I mirrored my cfscrape to an existing implementation already as a pull request here. I have not tweaked it much right now. Ummm.... #11730
Noted. I used BeautifulSoup because that's what I'm familiar with and I'm just trying to get a working implementation right now to get past the weird 302 loop normally.
Nope. That's what I'm trying to figure out.
This is very much a work in progress. I don't really program Python and I'm just trying to see if I can get something roughly working.
Hmm.... Interesting.
Heh. That was from me running make. The Makefile rebuilds all the .md files so it changed that file for some reason. I don't know why and didn't notice it until I had already committed it. To be honest I have not issued a pull request and won't do so until I'm comfortable with it. I put it up as a public fork so I don't lose "progress". Regardless when I'm done (and this is assuming I'm even successful) what I'll probably do is cleanup by re-pulling a fresh copy of your fork and reapplying there. As for cfscrape.... The login route is what I'm seeing others using based on what I've seen but they also just grab the whole thing at once with cfscrape.get() and work from there then dump as a cookies file before invoking the actual script and including the cookies with it. Basically what I'm doing except I'm just dumping cookies from my browser. |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like this:[x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2018.08.04. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the
-vflag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):Description of your issue, suggested solution and other information
The username and password is correct, but it says "Wrong login info". This was working fine as of July 27th, but now I am unable to download anything from Crunchyroll.
It looks like this same issue is referenced here: #17116 (comment)
I haven't tested the fix mentioned in that comment, but it would be nice if youtube-dl could be updated to officially fix the issue. Thank you.