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

MITxPro no longer supported by -x mitxpro #673

Open acknowledgeworkimagine opened 3 years ago

acknowledgeworkimagine commented 3 years ago

Subject of the issue I can't download from mitxpro.mit.edu. I believe it may be due to url for a programm is different.

https://courses.xpro.mit.edu/courses/course-v1:xPRO+SysEngx1+R12/course/

Your environment Operating System (name/version): Windows 10 Python version: Python 3.8.7 youtube-dl version: 2021.04.17 edx-dl version: 0.1.13 Steps to reproduce I can see mitxpro is supposed to be supported by switch -x mitxpro, however the courses I have are at the domain https://courses.xpro.mit.edu, in fact mitxpro.mit.edu redirects to xpro.mit.edu.

Expected behaviour The domain xpro.mit.edu and https://courses.xpro.mit.edu. should be supported.

Actual behaviour edx-dl -u user@domain.com -p password -i -x mitxpro --sequential https://courses.xpro.mit.edu/courses/course-v1:xPRO+SysEngx1+R12/course/ edx_dl version 0.1.13 Building initial headers for future requests. Getting initial CSRF token. Did not find the CSRF token. Logging into Open edX site: https://mitxpro.mit.edu/login_ajax Traceback (most recent call last): File "c:\users\coco\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\coco\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\coco\AppData\Local\Programs\Python\Python38\Scripts\edx-dl.exe__main__.py", line 7, in File "c:\users\coco\appdata\local\programs\python\python38\lib\site-packages\edx_dl\edx_dl.py", line 1008, in main resp = edx_login(LOGIN_API, headers, args.username, args.password) File "c:\users\coco\appdata\local\programs\python\python38\lib\site-packages\edx_dl\edx_dl.py", line 230, in edx_login resp = json.loads(response.read().decode('utf-8')) File "c:\users\coco\appdata\local\programs\python\python38\lib\json__init__.py", line 357, in loads return _default_decoder.decode(s) File "c:\users\coco\appdata\local\programs\python\python38\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "c:\users\coco\appdata\local\programs\python\python38\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 4 column 1 (char 3)