coursera-dl / edx-dl

A simple tool to download video lectures from edx.org (and other openedx sites)
GNU Lesser General Public License v3.0
1.93k stars 640 forks source link

Cannot download from edx-dl please help #642

Open ahmadshapiro opened 4 years ago

ahmadshapiro commented 4 years ago

🚨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

Describe your issue here.

Your environment

Steps to reproduce

Tell us how to reproduce this issue. Please provide us the course URL, and the specific subsection or unit if possible. course url : https://courses.edx.org/courses/course-v1:MITx+14.310x+2T2020/course/

Expected behaviour

it should've been downloaded

Actual behaviour

python edx-dl.py -u MAIL https://courses.edx.org/courses/course-v1:MITx+14.310x+2T2020/course/ edx_dl version 0.1.13 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 Extracting course information from dashboard. Traceback (most recent call last): File "edx-dl.py", line 8, in edx_dl.main() File "/media/shapiro/HDD/EDX DL/edx-dl/edx_dl/edx_dl.py", line 1023, in main for selected_course in selected_courses} File "/media/shapiro/HDD/EDX DL/edx-dl/edx_dl/edx_dl.py", line 1023, in for selected_course in selected_courses} File "/media/shapiro/HDD/EDX DL/edx-dl/edx_dl/edx_dl.py", line 184, in get_available_sections page = get_page_contents(url, headers) File "/media/shapiro/HDD/EDX DL/edx-dl/edx_dl/utils.py", line 58, in get_page_contents result = urlopen(Request(url, None, headers)) File "/home/shapiro/anaconda3/lib/python3.7/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/home/shapiro/anaconda3/lib/python3.7/urllib/request.py", line 531, in open response = meth(req, response) File "/home/shapiro/anaconda3/lib/python3.7/urllib/request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "/home/shapiro/anaconda3/lib/python3.7/urllib/request.py", line 569, in error return self._call_chain(args) File "/home/shapiro/anaconda3/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(args) File "/home/shapiro/anaconda3/lib/python3.7/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

haddnist commented 4 years ago

me too, same error

MarwanShehata commented 4 years ago

Same error here too

weirdsourcer commented 4 years ago

here also, happens to all my courses

PaulaNietoG commented 4 years ago

This solution here https://github.com/coursera-dl/edx-dl/issues/637#issuecomment-674231127 worked for me. Same thing with Chrome but you need to check which version you're using

AshMp commented 4 years ago

Greetings please kindly assist with the problem depicted below. I am failing to download courses from edx. I have followed everything that has been given on github's edx-dl page, but I am stuck at the point depicted below. Please kindly assist, the courses on edx are of great help, I don't want the knowledge they offer to pass me by. Thank you.

edx_dl version 0.1.13 Building initial headers for future requests. Getting initial CSRF token. Found CSRF token. Logging into Open edX site: https://courses.edx.org/login_ajax Extracting course information from dashboard. Traceback (most recent call last): File "c:\users\asus\appdata\local\programs\python\python38\lib\runpy.py", line 193, in _run_module_as_main return run_code(code, main_globals, None, File "c:\users\asus\appdata\local\programs\python\python38\lib\runpy.py", line 86, in run_code exec(code, run_globals) File "C:\Users\Asus\AppData\Local\Programs\Python\Python38\Scripts\edx-dl.exe__main.py", line 7, in File "c:\users\asus\appdata\local\programs\python\python38\lib\site-packages\edx_dl\edx_dl.py", line 1020, in main all_selections = {selected_course: File "c:\users\asus\appdata\local\programs\python\python38\lib\site-packages\edx_dl\edx_dl.py", line 1021, in get_available_sections(selected_course.url.replace('info', 'course'), File "c:\users\asus\appdata\local\programs\python\python38\lib\site-packages\edx_dl\edx_dl.py", line 184, in get_available_sections page = get_page_contents(url, headers) File "c:\users\asus\appdata\local\programs\python\python38\lib\site-packages\edx_dl\utils.py", line 58, in get_page_contents result = urlopen(Request(url, None, headers)) File "c:\users\asus\appdata\local\programs\python\python38\lib\urllib\request.py", line 222, in urlopen return opener.open(url, data, timeout) File "c:\users\asus\appdata\local\programs\python\python38\lib\urllib\request.py", line 531, in open response = meth(req, response) File "c:\users\asus\appdata\local\programs\python\python38\lib\urllib\request.py", line 640, in http_response response = self.parent.error( File "c:\users\asus\appdata\local\programs\python\python38\lib\urllib\request.py", line 569, in error return self._call_chain(args) File "c:\users\asus\appdata\local\programs\python\python38\lib\urllib\request.py", line 502, in _call_chain result = func(args) File "c:\users\asus\appdata\local\programs\python\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

phaneshavr commented 4 years ago

I am also facing the same problem. Please help