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 639 forks source link

did not download any videos from stanford #484

Closed jinstrong closed 6 years ago

jinstrong commented 6 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

did not download any videos from stanford

Your environment

Steps to reproduce

1: have account on stanford and enroll course;

Expected behaviour

expected to download courses videos from website

Actual behaviour

shows no video to download as below:


C:\stanford-downloader-master>c:\Anaconda3\python.exe edx-dl.py -u jinqiang.he@hotmail.com -x stanford --list-courses
Password:
Building initial headers for future requests.
Getting initial CSRF token.
Found CSRF token.
Logging into Open edX site: https://lagunita.stanford.edu/login_ajax
Extracting course information from dashboard.
You can access 3 courses
 1 - Statistical Learning [HumanitiesandScience/StatLearning/Winter2015]
     https://lagunita.stanford.edu/courses/HumanitiesandScience/StatLearning/Winter2015/info
 2 - Algorithms: Design and Analysis [course-v1:Engineering+Algorithms1+SelfPaced]
     https://lagunita.stanford.edu/courses/course-v1:Engineering+Algorithms1+SelfPaced/info
 3 - Statistical Learning [HumanitiesSciences/StatLearning/Winter2016]
     https://lagunita.stanford.edu/courses/HumanitiesSciences/StatLearning/Winter2016/info

C:\stanford-downloader-master>c:\Anaconda3\python.exe edx-dl.py -u jinqiang.he@hotmail.com -x stanford https://lagunita.stanford.edu/courses/HumanitiesSciences/StatLearning/Winter2016/info --list-sections
Password:
Building initial headers for future requests.
Getting initial CSRF token.
Found CSRF token.
Logging into Open edX site: https://lagunita.stanford.edu/login_ajax
Extracting course information from dashboard.
Statistical Learning [HumanitiesSciences/StatLearning/Winter2016] has 0 sections so far

Added debug parameter as below:

C:\stanford-downloader-master>c:\Anaconda3\python.exe edx-dl.py -u jinqiang.he@hotmail.com -f mp4 -x stanford https://lagunita.stanford.edu/courses/HumanitiesSciences/StatLearning/Winter2016/info --debug
Password:
root[edx_get_headers] Building initial headers for future requests.
root[_get_initial_token] Getting initial CSRF token.
root[_get_initial_token] Found CSRF token.
root[edx_get_headers] Headers built: {'User-Agent': 'edX-downloader/0.01', 'Accept': 'application/json, text/javascript, */*; q=0.01', 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8', 'Referer': 'https://lagunita.stanford.edu/login_ajax', 'X-Requested-With': 'XMLHttpRequest', 'X-CSRFToken': 'zwq93Ai0w0xa4vASBHQogj8bv4ZUp8rQ'}
root[edx_login] Logging into Open edX site: https://lagunita.stanford.edu/login_ajax
root[get_courses_info] Extracting course information from dashboard.
root[get_courses_info] Data extracted: [Statistical Learning: https://lagunita.stanford.edu/courses/HumanitiesandScience/StatLearning/Winter2015/info, Algorithms: Design and Analysis: https://lagunita.stanford.edu/courses/course-v1:Engineering+Algorithms1+SelfPaced/info, Statistical Learning: https://lagunita.stanford.edu/courses/HumanitiesSciences/StatLearning/Winter2016/info]
root[get_available_sections] Extracting sections for :https://lagunita.stanford.edu/courses/HumanitiesSciences/StatLearning/Winter2016/courseware
root[get_available_sections] Extracted sections: []
root[_display_selections] Downloading Statistical Learning [HumanitiesSciences/StatLearning/Winter2016]
root[_display_sections] Downloading 0 section(s)
root[extract_all_units_in_parallel] Extracting all units information in parallel.
root[extract_all_units_in_parallel] urls: []
root[parse_units] No downloadable video found.
jinstrong commented 6 years ago

In above problem, I did not install edx-dl but directly run in script mode. When instead I installed the edx-dl via pip, seems it could work normally. Not sure of the problem.