Fix 400 Bad Request when login with username and password #382
Conversation
With few request you will be facing 403 forbidden.this was my old solution if you check earlier versions of udemy-dl i was authenticating the same way and is not a permanent solution so i will stick to the cookie based for now until unless i don't find a permanent solution |
@r0oth3x49 lol, you like close everything . No, it's not the same, feel free to test it. But test like a human, not like a machine, and make requests like crazy. I tested this method for like a week, make request to login like every 30 seconds and everything is fine. Because it just make 2 requests and it's done its job, no need that request to login anymore. If you login like 30 times like crazy (i don't know why you do that ?), maybe you will get 403, just wait 10 or 15 minutes and you good to go. |
I know you are humble to download thing, i might also be but there are many users who just want to download all the courses at once, and if they face 403 error they don't even look if this is discussed or not directly go with new issue creating, for me which is wasting time on explaining them that they have to wait for a while. Just take a look at old issues. Don't mind, I know you are a very active contributor & i love + appreciate your work to keep things upto date. thanks for that bro 👍 |
@r0oth3x49 no, i told you, use like a human, not a machine, and think that way, and i know about the old days when you use the same url (kind of) like i use right now, but i told you, it's not the same. And i tested it for you just now, make 6 tabs terminal at the same time, different accounts, different course. (even human don't do that, you try to rip course and upload illegal or what?) and everything is fine. And you said if they get an error (if they're not human), just tell them to use cookie, why would tell them to wait, like the situation happen before i commit this fix. And talking about that, UnicodeError like another post i made, i didn't even know that |
I have clearly mentioned in earlier issues many have faced the issue and i have discussed the solution to this |
@r0oth3x49 when @talhashoaib report that issue, did you know that is an Unicode error? You don't, right? Because of that FileNotFoundError, i manage to know about the error, and even that --unsafe flag. People just looking for what they need, even that cookie thing you already write tag and guide but you see, so many people asking for help and don't even try to login with cookie because they don't care. I have a username and password, so let me in, if you don't, i will find you ........ and ask you. I thought about that tho, that's why i don't remove that |
In your old commits, you often get 403 error because you didn't config HEADERS the right way, i got that issue too (with incorrectly HEADERS like your old commits) and the ban is shorter, like 5 minutes, that why you output "Please wait a few minutes". But with this fix, that doesn't happen, you do get 403 error (but not for a normal use) and the time get longer because you acted like a robot, login like 30 times in just a blink, ban about 10 or 15 minutes. |
…his fix) who fixed the issue in #382 PR, updated code quality
Issue: #341
Fixed, tested on Python 2.7.16 and 3.7.2