Closed seq112215 closed 4 years ago
It happens with every other course on edx.
I am getting the same error when I have used this package for a while...
Getting the same error, can't even list my courses let alone download.
Same problem here.
I'm also getting this.
Having thesame problem too
Same error here. Something is telling me that edx API's have changed, and the project has not been updated.
I'm not an author of the tool, but you can fix it by changing line 425 of edx_dl.py
which specifies the User-Agent attribute of the http request header. Change 'User-Agent': 'edX-downloader/0.01',
to 'User-Agent': 'Mozilla/5.0',
and it will work.
I'm not an author of the tool, but you can fix it by changing line 425 of
edx_dl.py
which specifies the User-Agent attribute of the http request header. Change'User-Agent': 'edX-downloader/0.01',
to'User-Agent': 'Mozilla/5.0',
and it will work.
Thanks fix works like magic
@THolding Thanks a lot. It works like magic indeed.
Worked for me too! Thank you!!
Thank you! At first it didn't work for me because I was trying to run it using Python version 2.7. But when I did it using Python 3.8 it worked like a charm!
I'm not an author of the tool, but you can fix it by changing line 425 of
edx_dl.py
which specifies the User-Agent attribute of the http request header. Change'User-Agent': 'edX-downloader/0.01',
to'User-Agent': 'Mozilla/5.0',
and it will work.
Unfortunately, it did not work me.
🚨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
I cannot download the course
Your environment
Steps to reproduce
edx-dl -u user@mail.net -p password https://courses.edx.org/courses/course-v1:MITx+3.054.3x+1T2020/course/
Expected behaviour
Download the course
Actual behaviour
edx_dl version 0.1.13 Building initial headers for future requests. Getting initial CSRF token. Traceback (most recent call last): File "c:\program files\python38\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\program files\python38\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "c:\Program Files\Python38\Scripts\edx-dl.exe__main__.py", line 7, in
File "c:\program files\python38\lib\site-packages\edx_dl\edx_dl.py", line 1005, in main
headers = edx_get_headers()
File "c:\program files\python38\lib\site-packages\edx_dl\edx_dl.py", line 430, in edx_get_headers
'X-CSRFToken': _get_initial_token(EDX_HOMEPAGE),
File "c:\program files\python38\lib\site-packages\edx_dl\edx_dl.py", line 167, in _get_initial_token
opener.open(url)
File "c:\program files\python38\lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "c:\program files\python38\lib\urllib\request.py", line 640, in http_response
response = self.parent.error(
File "c:\program files\python38\lib\urllib\request.py", line 569, in error
return self._call_chain(args)
File "c:\program files\python38\lib\urllib\request.py", line 502, in _call_chain
result = func(args)
File "c:\program files\python38\lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden