Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

400 error #686

Open
Tarun1625 opened this issue Sep 1, 2023 · 2 comments
Open

400 error #686

Tarun1625 opened this issue Sep 1, 2023 · 2 comments

Comments

@Tarun1625
Copy link

🚨Please review the Troubleshooting section
before reporting any issue. Don't forget also to check the current issues to
avoid duplicates.

Subject of the issue

400 error

Your environment

  • Operating System (name/version):android
  • Python version:python3.11.5
  • youtube-dl version:
  • edx-dl version:

Steps to reproduce

Tell us how to reproduce this issue. Please provide us the course URL, and the
specific subsection or unit if possible.
I tried to run this cmd
~ $ coursera-dl -u [email protected] --list-courses -p xxxx

Expected behaviour

Tell us what should happen.
It should show list of courses in which i have enrolled

Actual behaviour

Tell us what happens instead. If the script fails, please copy the entire
output of the command or the stacktrace (don't forget to obfuscate your
username and password). If you cannot copy the exception, attach a screenshot.

tried more than 50 times, same error

coursera_dl version 0.11.5
Listing enrolled courses
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/coursera/cookies.py", line 148, in login
r.raise_for_status()
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.coursera.org/api/login/v3

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/data/com.termux/files/usr/bin/coursera-dl", line 8, in
sys.exit(main())
^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/coursera/coursera_dl.py", line 232, in main
list_courses(args)
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/coursera/coursera_dl.py", line 108, in list_courses
login(session, args.username, args.password)
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/coursera/cookies.py", line 155, in login
raise AuthenticationFailed('Cannot login on coursera.org: %s' % e)
coursera.cookies.AuthenticationFailed: Cannot login on coursera.org: 400 Client Error: Bad Request for url: https://api.coursera.org/api/login/v3

@CaligoLab
Copy link

+1 to the issue
Mine was for Windows 10 from Anaconda Prompt (Anaconda3)
edx_dl version 0.1.13

Tried many times, email and password verified and copied to exclude typos.
After entering the email and password:

Building initial headers for future requests.
Getting initial CSRF token.
Found CSRF token.
Logging into Open edX site: https://courses.edx.org/login_ajax
Error, cannot login: HTTP Error 400: Bad Request
Wrong Email or Password.

@csyezheng
Copy link

I forked the repository and fixed it to a working version: https://github.com/csyezheng/edx-dl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants