coursera-dl / coursera-dl

Script for downloading Coursera.org videos and naming them.
GNU Lesser General Public License v3.0
9.35k stars 2.21k forks source link

Could this script download the 'specializations' or 'learn ' course in coursera ? #433

Closed wdongm closed 8 years ago

wdongm commented 8 years ago

I want to learn the machine learning,someone recommend me a series of course in this website

https://www.coursera.org/specializations/machine-learning

or

https://www.coursera.org/learn/ml-foundations/

Could this script download the specializations course in coursera ?

THX !!!

balta2ar commented 8 years ago

@wangdongming007 It can't download the whole specialization, but it can download each on-demand course separately (the one with /learn/ in the path). If you're using github version, simply pass course name. If you're using version from pip, add --on-demand option (though it's deprecated and will be removed).

wdongm commented 8 years ago

@balta2ar thx very much,it can work use the a command line coursera-dl -u *** -p *** --on-demand ml-foundations

But After the download a course,a problems happen as follow,it seems cookies has problem : do you know how to fix it ?

Downloading https://d3c33hcgiwev3.cloudfront.net/Cbww4FdwEeW0OQ7Ipijcrw.processed/full/540p/index.mp4?Expires=1452470400&Signature=HJUyItXt5eCZUuKmNI3-dAs1n~2d3T97kdJaS5Tt-HuA-abkYMIjrqbhBLI119HGkghL1dZt9H2fM2tj7q7yxe1l-hlwgPBbkcqljVku3r7l9YhbSv5KXg5zjQFWmJitPZWpTGdpH3oTapIRMds0hKrdX~YBC0FtUViNAOjGwVs_&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A -> ml-foundations\02_regression-predicting-house-prices\04_predicting-house-prices-ipython-notebook\03_learning-a-simple-regression-model-to-predict-house-prices-from-house-size.mp4 Starting new HTTPS connection (1): d3c33hcgiwev3.cloudfront.net Traceback (most recent call last): File "D:\MOOC\coursera-dl-master\coursera-dl-master\coursera\cookies.py", line 91, in login r.raise_for_status() File "C:\Program Files\Python 3.5\lib\site-packages\requests\models.py", line 840, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://class.coursera.org/ml-foundations

During handling of the above exception, another exception occurred:

i use another command:

coursera-dl -u \ -p *** --on-demand learn/ml-foundations

D:\MOOC\coursera-dl-master\coursera-dl-master>coursera-dl -u \ -p *** --on-demand learn/ml-foundations --on-demand option is deprecated and is not required anymore. Do not use this option. It will be removedin the future. Downloading class: learn/ml-foundations Starting new HTTPS connection (1): class.coursera.org Starting new HTTPS connection (1): www.coursera.org Logged in on coursera.org. Starting new HTTPS connection (1): class.coursera.org Could not authenticate: Did not find necessary cookies.

balta2ar commented 8 years ago

@wangdongming007 Class name is ml-foundations, not learn/ml-foundations. It looks like you're using github version, so --on-demand option is not required, please remove it from command line. Command line should look like this:

coursera-dl -u ******** -p ********* ml-foundations

Try it and see whether it works.

prylypko commented 8 years ago

Receiving same error as @wangdongming007 when trying to download mathematics-and-python course. Was able to successfully download ml-foundations course with code provided by @balta2ar

crypdick commented 8 years ago

@balta2ar's code is not working for me. I can stream the ml-foundations lectures fine off the website.

 ✘  ~/Documents/Academic  coursera-dl  ml-foundations 
Coursera-dl v3.1.1 (html.parser)
Credentials found in .netrc file
Logging in as '[CENSORED]@gmail.com'...
Traceback (most recent call last):
  File "/home/richard/Apps/anaconda2/bin/coursera-dl", line 11, in <module>
    sys.exit(main())
  File "/home/richard/Apps/anaconda2/lib/python2.7/site-packages/courseradownloader/courseradownloader.py", line 648, in main
    d.login(args.course_names[0])
  File "/home/richard/Apps/anaconda2/lib/python2.7/site-packages/courseradownloader/courseradownloader.py", line 136, in login
    raise Exception("Unknown class %s" % className)
Exception: Unknown class ml-foundations

 ~/Documents/Academic  coursera-dl  --on-demand ml-foundations                                      
usage: coursera-dl [-h] [-u USERNAME] [-p PASSWORD] [-d DEST_DIR]
                   [-n IGNOREFILES] [-i INCLUDEFILES] [-l LANG] [-q PARSER]
                   [-x PROXY] [--reverse-sections] [--gz] [-mppl MPPL]
                   [-w WKFILTER]
                   <course name> [<course name> ...]
coursera-dl: error: unrecognized arguments: --on-demand
IbraamNasif commented 5 years ago

hello @balta2ar

if so, what's the function of this command --specialization

also, how i download quizzes and all reading resources?

venkatesh-vk commented 4 years ago

@IbraamNasif use --download-quizzes to download all quizz -f "ppt" for ppt