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

edx-dl not able to download videos from edx platform #559

Closed MATRIX30 closed 4 years ago

MATRIX30 commented 5 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

edx-dl fails to extract and download videos for "https://courses.edx.org/courses/course-v1:EdinburghX+PA1.1x+3T2019/course/" on www.edx.org it seems the videos for this course are sourced from "https://media.ed.ac.uk/" and not youtube Need help on resolving this issue

Your environment

Steps to reproduce

--- create an account on Edx

--- enroll for the course "https://courses.edx.org/courses/course-v1:EdinburghX+PA1.1x+3T2019/course/"

---- type the following into CMD
edx-dl -u username -p password -o path --ignore-errors --cache https://courses.edx.org/courses/course-v1:EdinburghX+PA1.1x+3T2019/course/

Expected behaviour

download to start normally

Actual behaviour

edx_dl version 0.1.10 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. Downloading Introduction to Predictive Analytics [course-v1:EdinburghX+PA1.1x+3T2019/co] Downloading 0 section(s) loading 2329 urls from cache [edx-dl.cache] Extracting all units information in parallel. No downloadable video found.

sasidhar22 commented 4 years ago

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

MuradShafiyev commented 4 years ago

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.exemain.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

Same issue :(

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