Script for downloading Coursera.org videos and naming them.

Overview

Coursera Downloader

Build Status Build status Coverage Status Latest version on PyPI Code Climate

Introduction

Coursera is arguably the leader in massive open online courses (MOOC) with a selection of more than 300 classes from 62 different institutions as of February 2013. Generous contributions by educators and institutions are making excellent education available to many who could not afford it otherwise. There are even non-profits with "feet on the ground" in remote areas of the world who are helping spread the wealth (see the feedback below from Tunapanda).

This script makes it easier to batch download lecture resources (e.g., videos, ppt, etc) for Coursera classes. Given one or more class names and account credentials, it obtains week and class names from the lectures page, and then downloads the related materials into appropriately named files and directories.

Why is this helpful? A utility like wget can work, but has the following limitations:

  1. Video names have numbers in them, but this does not correspond to the actual order. Manually renaming them is a pain that is best left for computers.
  2. Using names from the syllabus page provides more informative names.
  3. Using wget in a for loop picks up extra videos which are not posted/linked, and these are sometimes duplicates.

Browser extensions like DownloadThemAll is another possibility, but coursera-dl provides more features such as appropriately named files.

This work was originally inspired in part by youtube-dl by which I've downloaded many other good videos such as those from Khan Academy.

Features

  • Support for all kinds of courses (i.e., "Old Platform"/time-based as well as "New Platform"/on-demand courses).
  • Intentionally detailed names, so that it will display and sort properly on most interfaces (e.g., VLC or MX Video on Android devices).
  • Regex-based section (week) and lecture name filters to download only certain resources.
  • File format extension filter to grab resource types you want.
  • Login credentials accepted on command-line or from .netrc file.
  • Default arguments loaded from coursera-dl.conf file.
  • Core functionality tested on Linux, Mac and Windows.

Disclaimer

coursera-dl is meant to be used only for your material that Coursera gives you access to download.

We do not encourage any use that violates their Terms Of Use. A relevant excerpt:

"[...] Coursera grants you a personal, non-exclusive, non-transferable license to access and use the Sites. You may download material from the Sites only for your own personal, non-commercial use. You may not otherwise copy, reproduce, retransmit, distribute, publish, commercially exploit or otherwise transfer any material, nor may you modify or create derivatives works of the material."

Installation instructions

coursera-dl requires Python 2 or Python 3 and a free Coursera account enrolled in the class of interest. (As of February of 2016, we test automatically the execution of the program with Python versions 2.6, 2.7, Pypy, 3.4, 3.5, and 3.6).

Note: We strongly recommend that you use a Python 3 interpreter (3.4 or later).

On any operating system, ensure that the Python executable location is added to your PATH environment variable and, once you have the dependencies installed (see next section), for a basic usage, you will need to invoke the script from the main directory of the project and prepend it with the word python. You can also use more advanced features of the program by looking at the "Running the script" section of this document.

Note: You must already have (manually) agreed to the Honor of Code of the particular courses that you want to use with coursera-dl.

Recommended installation method for all Operating Systems

From a command line (preferably, from a virtual environment), simply issue the command:

pip install coursera-dl

This will download the latest released version of the program from the Python Package Index (PyPI) along with all the necessary dependencies. At this point, you should be ready to start using it.

If this does not work, because your Python 2 version is too old (e.g. 2.7.5 on Ubuntu 14.4), try:

apt-get install python3 python3-pip
pip3 install coursera-dl

instead.

Note 1: We strongly recommend that you don't install the package globally on your machine (i.e., with root/administrator privileges), as the installed modules may conflict with other Python applications that you have installed in your system (or they can interfere with coursera-dl). Prefer to use the option --user to pip install, if you need can.

Note 2: As already mentioned, we strongly recommend that you use a new Python 3 interpreter (e.g., 3.4 or later), since Python 3 has better support for SSL/TLS (for secure connections) than earlier versions.
If you must use Python 2, be sure that you have at least Python 2.7.9 (later versions are OK).
Otherwise, you can still use coursera-dl, but you will have to install the extra package ndg-httpsclient, which may involve compilation (at least on Linux systems).

Alternative ways of installing missing dependencies

We strongly recommend that you consider installing Python packages with pip, as in it is the current preferred method, unless directed otherwise by one of the project members (for instance, when testing or debugging a new feature or using the source code directly from our git repository). If you are using pip, you can directly install all the dependencies from the requirements file using pip install -r requirements.txt.

Alternative installation method for Unix systems

We strongly recommend that you install coursera-dl and all its dependencies in a way that does not interfere with the rest of your Python installation. This is accomplished by the creation of a virtual environment, or "virtualenv".

For the initial setup, in a Unix-like operating system, please use the following steps (create/adapt first the directory /directory/where/I/want/my/courses):

cd /directory/where/I/want/my/courses
virtualenv my-coursera
cd my-coursera
source bin/activate
git clone https://github.com/coursera-dl/coursera-dl
cd coursera-dl
pip install -r requirements.txt
./coursera-dl ...

To further download new videos from your classes, simply perform:

cd /directory/where/I/want/my/courses/my-coursera
source bin/activate
cd coursera-dl
./coursera-dl ...

We are working on streamlining this whole process so that it is as simple as possible, but to support older versions of Python and to cope with Coursera disabling SSLv3, we have to take a few extra steps. In any case, it is highly recommended that you always install the latest version of the Python interpreter that you can.

ArchLinux

AUR package: coursera-dl

Installing dependencies on your own

Warning: This method is not recommended unless you have experience working with multiple Python environments.

You can use the pip program to install the dependencies on your own. They are all listed in the requirements.txt file (and the extra dependencies needed for development are listed in the requirements-dev.txt file).

To use this method, you would proceed as:

pip install -r requirements.txt
pip install -r requirements-dev.txt

The second line above should only be needed if you intend to help with development (and help is always welcome) or if a maintainer of the project asks you to install extra packages for debugging purposes.

Once again, before filing bug reports, if you installed the dependencies on your own, please check that the versions of your modules are at least those listed in the requirements.txt file (and, requirements-dev.txt file, if applicable).

Docker

If you prefer you can run this software inside Docker:

docker run --rm -it -v \
    "$(pwd):/courses" \
    courseradl/courseradl -u <USER> -p <PASSWORD>

Or using netrc file:

docker run --rm -it \
    -v "$(pwd):/courses" -v "$HOME/.netrc:/netrc" \
    courseradl/courseradl -n /netrc

The actual working dir for coursera-dl is /courses, all courses will be downloaded there if you don't specify otherwise.

Windows

python -m pip install coursera-dl

Be sure that the Python install path is added to the PATH system environment variables. This can be found in Control Panel > System > Advanced System Settings > Environment Variables.

Example:
C:\Python35\Scripts\;C:\Python35\;

Or if you have restricted installation permissions and you've installed Python under AppData, add this to your PATH.

Example:
C:\Users\<user>\AppData\Local\Programs\Python\Python35-32\Scripts;C:\Users\<user>\AppData\Local\Programs\Python\Python35-32;

Coursera-dl can now be run from commandline or powershell.

Create an account with Coursera

If you don't already have one, create a Coursera account and enroll in a class. See https://www.coursera.org/courses for the list of classes.

Running the script

Refer to coursera-dl --help for a complete, up-to-date reference on the runtime options supported by this utility.

Run the script to download the materials by providing your Coursera account credentials (e.g. email address and password or a ~/.netrc file), the class names, as well as any additional parameters:

    General:                     coursera-dl -u <user> -p <pass> modelthinking-004

    With CAUTH parameter:	 coursera-dl -ca 'some-ca-value-from-browser' modelthinking-004

If you don't want to type your password in command line as plain text, you can use the script without -p option. In this case you will be prompted for password once the script is run.

Here are some examples of how to invoke coursera-dl from the command line:

    Without -p field:            coursera-dl -u <user> modelthinking-004
    Multiple classes:            coursera-dl -u <user> -p <pass> saas historyofrock1-001 algo-2012-002
    Filter by section name:      coursera-dl -u <user> -p <pass> -sf "Chapter_Four" crypto-004
    Filter by lecture name:      coursera-dl -u <user> -p <pass> -lf "3.1_" ml-2012-002
    Download only ppt files:     coursera-dl -u <user> -p <pass> -f "ppt" qcomp-2012-001
    Use a ~/.netrc file:         coursera-dl -n -- matrix-001
    Get the preview classes:     coursera-dl -n -b ni-001
	Download videos at 720p:     coursera-dl -n --video-resolution 720p ni-001
    Specify download path:       coursera-dl -n --path=C:\Coursera\Classes\ comnetworks-002
    Display help:                coursera-dl --help

    Maintain a list of classes in a dir:
      Initialize:              mkdir -p CURRENT/{class1,class2,..classN}
      Update:                  coursera-dl -n --path CURRENT `\ls CURRENT`

Note: If your ls command is aliased to display a colorized output, you may experience problems. Be sure to escape the ls command (use \ls) to assure that no special characters get sent to the script.

Note that we do support the New Platform ("on-demand") courses.

By default, videos are downloaded at 540p resolution. For on-demand courses, the --video-resolution flag accepts 360p, 540p, and 720p values.

To download just the .txt and/or .srt subtitle files instead of the videos, use -ignore-formats mp4 --subtitle-language en or whatever format the videos are encoded in and desired languages for subtitles.

On *nix platforms, the use of a ~/.netrc file is a good alternative to specifying both your username (i.e., your email address) and password every time on the command line. To use it, simply add a line like the one below to a file named .netrc in your home directory (or the equivalent, if you are using Windows) with contents like:

    machine coursera-dl login <user> password <pass>

Create the file if it doesn't exist yet. From then on, you can switch from using -u and -p to simply call coursera-dl with the option -n instead. This is especially convenient, as typing usernames (email addresses) and passwords directly on the command line can get tiresome (even more if you happened to choose a "strong" password).

Alternatively, if you want to store your preferred parameters (which might also include your username and password), create a file named coursera-dl.conf where the script is supposed to be executed, with the following format:

    --username <user>
    --password <pass>
    --subtitle-language en,zh-CN|zh-TW
    --download-quizzes
    #--mathjax-cdn https://cdn.bootcss.com/mathjax/2.7.1/MathJax.js
    # more other parameters

Parameters which are specified in the file will be overriden if they are provided again on the commandline.

Note: In coursera-dl.conf, all the parameters should not be wrapped with quotes.

Resuming downloads

In default mode when you interrupt the download process by pressing CTRL+C, partially downloaded files will be deleted from your disk and you have to start the download process from the beginning. If your download was interrupted by something other than KeyboardInterrupt (CTRL+C) like sudden system crash, partially downloaded files will remain on your disk and the next time you start the process again, these files will be discarded from download list!, therefore it's your job to delete them manually before next start. For this reason we added an option called --resume which continues your downloads from where they stopped:

coursera-dl -u <user> -p <pass> --resume sdn1-001

This option can also be used with external downloaders:

coursera-dl --wget -u <user> -p <pass> --resume sdn1-001

Note 1: Some external downloaders use their own built-in resume feature which may not be compatible with others, so use them at your own risk.

Note 2: Remember that in resume mode, interrupted files WON'T be deleted from your disk.

NOTE: If your password contains punctuation, quotes or other "funny characters" (e.g., <, >, #, &, | and so on), then you may have to escape them from your shell. With bash or other Bourne-shell clones (and probably with many other shells) one of the better ways to do so is to enclose your password in single quotes, so that you don't run into problems. See issue #213 for more information.

Troubleshooting

If you have problems when downloading class materials, please try to see if one of the following actions solve your problem:

  • Make sure the class name you are using corresponds to the resource name used in the URL for that class: https://www.coursera.org/learn/<CLASS_NAME>/home/welcome

  • Have you tried to clean the cached cookies/credentials with the --clear-cache option?

  • Note that many courses (most, perhaps?) may remove the materials after a little while after the course is completed, while other courses may retain the materials up to a next session/offering of the same course (to avoid problems with academic dishonesty, apparently).

    In short, it is not guaranteed that you will be able to download after the course is finished and this is, unfortunately, nothing that we can help you with.

  • Make sure you have installed and/or updated all of your dependencies according to the requirements.txt file as described above.

  • One can export a Netscape-style cookies file with a browser extension (1, 2) and use it with the -c option. This comes in handy when the authentication via password is not working (the authentication process changes now and then).

  • If results show 0 sections, you most likely have provided invalid credentials (username and/or password in the command line or in your .netrc file or in your coursera-dl.conf file).

  • For courses that have not started yet, but have had a previous iteration sometimes a preview is available, containing all the classes from the last course. These files can be downloaded by passing the --preview parameter.

  • If you get an error like Could not find class: <CLASS_NAME>, then:

    • Verify that the name of the course is correct. Current class names in coursera are composed by a short course name e.g. class and the current version of the course (a number). For example, for a class named class, you would have to use class-001, class-002 etc.
    • Second, verify that you are enrolled in the course. You won't be able to access the course materials if you are not officially enrolled and agreed to the honor course via the website.
  • If:

    • You get an error when using -n to specify that you want to use a .netrc file and,

    • You want the script to use your default netrc file and,

    • You get a message saying coursera-dl: error: too few arguments

      Then you should specify -- as an argument after -n, that is, -n -- or change the order in which you pass the arguments to the script, so that the argument after -n begins with an hyphen (-). Otherwise, Python's argparse module will think that what you are passing is the name of the netrc file that you want to use. See issue #162.

  • If your password has spaces, don't forget to write it using quotes.

  • Have you installed the right project ?

    Warning: If you installed the script using PyPi (pip) please verify that you installed the correct project. We had to use a different name in pip because our original name was already taken. Remember to install it using:

        pip install coursera-dl
    

China issues

If you are from China and you're having problems downloading videos, adding "52.84.167.78 d3c33hcgiwev3.cloudfront.net" in the hosts file (/etc/hosts) and freshing DNS with "ipconfig/flushdns" may work (see https://github.com/googlehosts/hosts for more info).

Found 0 sections and 0 lectures on this page

First of all, make sure you are enrolled to the course you want to download.

Many old courses have already closed enrollment so often it's not an option. In this case, try downloading with --preview option. Some courses allow to download lecture materials without enrolling, but it's not common and is not guaranteed to work for every course.

Finally, you can download the videos if you have, at least, the index file that lists all the course materials. Maybe your friend who is enrolled could save that course page for you. In that case use the --process_local_page option.

Alternatively you may want to try this various browser extensions designed for this problem.

If none of the above works for you, there is nothing we can do.

Download timeouts

Coursera-dl supports external downloaders but note that they are only used to download materials after the syllabus has been parsed, e.g. videos, PDFs, some handouts and additional files (syllabus is always downloaded using the internal downloader). If you experience problems with downloading such materials, you may want to start using external downloader and configure its timeout values. For example, you can use aria2c downloader by passing --aria option:

coursera-dl -n --path . --aria2  <course-name>

And put this into aria2c's configuration file ~/.aria2/aria2.conf to reduce timeouts:

connect-timeout=2
timeout=2
bt-stop-timeout=1

Timeout configuration for internal downloader is not supported.

Windows: proxy support

If you're on Windows behind a proxy, set up the environment variables before running the script as follows:

set HTTP_PROXY=http://host:port
set HTTPS_PROXY=http://host:port

Related discussion: #205

Windows: Failed to create process

In C:\Users\<user>\AppData\Local\Programs\Python\Python35-32\Scripts or wherever Python installed (above is default for Windows) edit below file in idle: (right click on script name and select 'edit with idle in menu)

coursera-dl-script

from

#!c:\users\<user>\appdata\local\programs\python\python35-32\python.exe

to

#"!c:\users\<user>\appdata\local\programs\python\python35-32\python.exe"

(add quotes). This is a known pip bug.

Source: issue #500 StackOverflow

SSLError: [Errno 1] _ssl.c:504: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure

This is a known error, please do not report about this error message! The problem is in YOUR environment. To fix it, do the following:

sudo apt-get install build-essential python-dev libssl-dev libffi-dev
pip install --user urllib3 pyasn1 ndg-httpsclient pyOpenSSL

If the error remains, try installing coursera-dl from github following this instruction: https://github.com/coursera-dl/coursera-dl#alternative-installation-method-for-unix-systems

If you still have the problem, please read the following issues for more ideas on how to fix it: #330 #377 #329

This is also worth reading: https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning

Alternative CDN for MathJax.js

When saving a course page, we enabled MathJax rendering for math equations, by injecting MathJax.js in the header. The script is using a cdn service provided by mathjax.org. However, that url is not accessible in some countries/regions, you can provide a --mathjax-cdn <MATHJAX_CDN> parameter to specify the MathJax.js file that is accessible in your region.

Reporting issues

Before reporting any issue please follow the steps below:

  1. Verify that you are running the latest version of the script, and the recommended versions of its dependencies, see them in the file requirements.txt. Use the following command if in doubt:

     pip install --upgrade coursera-dl
    
  2. If the problem persists, feel free to open an issue in our bugtracker, please fill the issue template with as much information as possible.

Filing an issue/Reporting a bug

When reporting bugs against coursera-dl, please don't forget to include enough information so that you can help us help you:

  • Is the problem happening with the latest version of the script?
  • What operating system are you using?
  • Do you have all the recommended versions of the modules? See them in the file requirements.txt.
  • What is the course that you are trying to access?
  • What is the precise command line that you are using (feel free to hide your username and password with asterisks, but leave all other information untouched).
  • What are the precise messages that you get? Please, use the --debug option before posting the messages as a bug report. Please, copy and paste them. Don't reword/paraphrase the messages.

Feedback

I enjoy getting feedback. Here are a few of the comments I've received:

  • "Thanks for the good job! Knowledge will flood the World a little more thanks to your script!"
    Guillaume V. 11/8/2012

  • "Just wanted to send you props for your Python script to download Coursera courses. I've been using it in Kenya for my non-profit to get online courses to places where internet is really expensive and unreliable. Mostly kids here can't afford high school, and downloading one of these classes by the usual means would cost more than the average family earns in one week. Thanks!"
    Jay L., Tunapanda 3/20/2013

  • "I am a big fan of Coursera and attend lots of different courses. Time constraints don't allow me to attend all the courses I want at the same time. I came across your script, and I am very happily using it! Great stuff and thanks for making this available on Github - well done!"
    William G. 2/18/2013

  • "This script is awesome! I was painstakingly downloading each and every video and ppt by hand -- looked into wget but ran into wildcard issues with HTML, and then.. I came across your script. Can't tell you how many hours you've just saved me :) If you're ever in Paris / Stockholm, it is absolutely mandatory that I buy you a beer :)"
    Razvan T. 11/26/2012

  • "Thanks a lot! :)"
    Viktor V. 24/04/2013

Contact

Please, post bugs and issues on github. Send other comments to Rogério Theodoro de Brito (the current maintainer): [email protected] (twitter: @rtdbrito) or to John Lehmann (the original author): first last at geemail dotcom (twitter: @jplehmann).

Comments
  • HTTPError: 400 Client Error: Bad Request for url: https://api.coursera.org/api/login/v3

    HTTPError: 400 Client Error: Bad Request for url: https://api.coursera.org/api/login/v3

    🚨Please review the Troubleshooting section before reporting any issue. Don't forget to check also the current issues to avoid duplicates.

    Subject of the issue

    Describe your issue here.

    Your environment

    • Mac OS X El Capitan:
    • Aleksandrs-Air:~ alekscooper$ python --version Python 2.7.10
    • coursera-dl version: 0.11.4

    Steps to reproduce

    • I created a coursera_dl folder on my Desktop

    • I created coursera-dl.conf file in that folder as required

    • My email contains only letters and a dot, it's a gmail.com account

    • My password has only letters and numbers

    • Is the problem happening with the latest version of the script? YES

    • Do you have all the recommended versions of the modules? See them in the file requirements.txt. YES

    • What is the course that you are trying to access? understanding-visualization-data https://www.coursera.org/learn/understanding-visualization-data/home/welcome

    • What is the precise command line that you are using (don't forget to obfuscate your username and password, but leave all other information untouched). coursera-dl understanding-visualization-data

    • What are the precise messages that you get? Please, use the --debug option before posting the messages as a bug report. Please, copy and paste them. Don't reword/paraphrase the messages.

    Expected behaviour

    The download should begin

    Actual behaviour

    coursera_dl version 0.11.4 Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/coursera/cookies.py", line 148, in login r.raise_for_status() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.coursera.org/api/login/v3

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/bin/coursera-dl", line 10, in sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/coursera/coursera_dl.py", line 236, in main login(session, args.username, args.password) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/coursera/cookies.py", line 155, in login raise AuthenticationFailed('Cannot login on coursera.org: %s' % e) coursera.cookies.AuthenticationFailed: Cannot login on coursera.org: 400 Client Error: Bad Request for url: https://api.coursera.org/api/login/v3

    opened by aakuptsov 317
  • NameError: global name 'className' is not defined

    NameError: global name 'className' is not defined

    When trying to download any course the error in the subject is shown :

    ./coursera-dl -u user@email --path /home/user/Downloads/coursera eqp-001
    Coursera password for user@email: 
    Downloading class: eqp-001
    Starting new HTTP connection (1): proxy.xxxxxxxx.com
    Traceback (most recent call last):
      File "./coursera-dl", line 1154, in <module>
        main()
      File "./coursera-dl", line 1134, in main
        if download_class(args, class_name):
      File "./coursera-dl", line 1090, in download_class
        login(session, class_name, args.username, args.password)
      File "./coursera-dl", line 189, in login
        raise ClassNotFound(className)
    NameError: global name 'className' is not defined
    
    bug more-info-needed 
    opened by bit-man 49
  • 'Did not find necessary cookies' output when trying to download courses

    'Did not find necessary cookies' output when trying to download courses

    Subject of the issue

    coursera-dl does not seem to authenticate through cookies correctly and always exits with the message: Could not authenticate: Did not find necessary cookies.

    I tried it for a number of course names: sdn1, sdn1-001, modelthinking, modelthinking-004, and the one I am currently interested in: crypto, for which I also tried learn/crypto.

    Your environment

    • Operating System (name/version): ArchLinux, Linux 4.6.2
    • Python version: 3.5.1
    • coursera-dl version: latest checkout 0.6.1 with commit 81b9d40 (also tried release version 0.6.1)

    Steps to reproduce

    Tell us how to reproduce this issue, please don't forget to include enough information so that you can help us help you:

    • Is the problem happening with the latest version of the script?

      • yes, checkout of the current repo at commit 81b9d40
    • Do you have all the recommended versions of the modules? See them in the file requirements.txt.

      • Performed sudo pip install -r requirements.txt --upgrade on the repo checkout.
    • What is the course that you are trying to access?

    • What is the precise command line that you are using.

      • coursera-dl -u '[email protected]' -p 'XXXXXXX' crypto
      • coursera-dl -u '[email protected]' -p 'XXXXXXX' learn/crypto
      • Note: I tried the --on-demand command switch, but this only outputs a depreciated option message extra.
    • What are the precise messages that you get? Please, use the --debug option before posting the messages as a bug report. Please, copy and paste them. Don't reword/paraphrase the messages.

      $ coursera-dl -u '[email protected]' -p 'XXXXXXX' crypto --debug root[main] coursera_dl version 0.6.1 root[main] Downloading class: crypto root[download_class] Downloading old style class crypto root[get_cookies_from_cache] Trying to get cookies from the cache. root[load_cookies_file] Loading cookie file /tmp/rolf_coursera_dl_cache/cookies/[email protected] into memory. root[get_cookies_from_cache] Could not load cookies from the cache. root[login] Initiating login. root[login] There were no .coursera.org cookies to be cleared. requests.packages.urllib3.connectionpool[_new_conn] Starting new HTTPS connection (1): class.coursera.org requests.packages.urllib3.connectionpool[_make_request] "GET /crypto HTTP/1.1" 200 None root[login] Forging cookie header: csrftoken=5jeRB9VL13vGBq5QZ; csrf2_token_oiH1R=____D0VB0Q2I3POZciw6Woio. requests.packages.urllib3.connectionpool[_new_conn] Starting new HTTPS connection (1): www.coursera.org requests.packages.urllib3.connectionpool[_make_request] "POST /api/login/v3 HTTP/1.1" 200 None root[login] Logged in on coursera.org. requests.packages.urllib3.connectionpool[_new_conn] Starting new HTTPS connection (1): class.coursera.org requests.packages.urllib3.connectionpool[_make_request] "GET /crypto/auth/auth_redirector?type=login&subtype=normal HTTP/1.1" 200 None root[down_the_wabbit_hole] Following https://class.coursera.org/crypto/auth/auth_redirector?type=login&subtype=normal to authenticate on class.coursera.org. root[down_the_wabbit_hole] Exiting "deep" authentication. root[main] Could not authenticate: Did not find necessary cookies.

    Expected behaviour

    Having used coursera-dl some time ago, I expected it to download the course.

    Actual behaviour

    If I run the command coursera-dl -u '[email protected]' -p 'XXXXXXX' crypto , or with any other course name, the output that I get back is as follows:

    coursera_dl version 0.6.1
    Downloading class: crypto
    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.
    
    opened by rolfmorel 43
  • Unable to download anything (authentication failure)

    Unable to download anything (authentication failure)

    It appears that the Coursera folk have changed where you access the videos again. It appears that it can login ok, but it finds "0 sections and 0 lectures". I tried both with the netrc and with explicitly giving my username and password.

    bug 
    opened by Smitty010 38
  • 404 error

    404 error

    Subject of the issue

    Script seems to log in properly, but gets a 404 error right away There are other issue reports also with a 404 error, but my guess was that this is different since the error occurs before it even attempts to download content, but seems to occur ( guessing here ) that it occurs when asking what the content is.

    Your environment

    • Operating System (name/version): Centos 7
    • Python version: Python 3.4.8
    • coursera-dl version: 0.11.2

    Steps to reproduce

    ../../my-coursera/coursera-dl/coursera-dl --debug -u xxx deep-neural-network Coursera password for xxx: root[main] coursera_dl version 0.11.2 root[main] Downloading class: deep-neural-network (1 / 1) root[download_class] Downloading new style (on demand) class deep-neural-network root[login] Initiating login. root[login] There were no .coursera.org cookies to be cleared. root[prepare_auth_headers] Forging cookie header: csrftoken=RULpmQA3UxlqGyfBdQCN; csrf2_token_m3Seki7K=lXRyVMIfMgL74fVCUtPlgItd. urllib3.connectionpool[_new_conn] Starting new HTTPS connection (1): api.coursera.org:443 urllib3.connectionpool[_make_request] https://api.coursera.org:443 "POST /api/login/v3 HTTP/1.1" 200 None root[login] Logged in on coursera.org. urllib3.connectionpool[_make_request] https://api.coursera.org:443 "GET /api/opencourse.v1/course/deep-neural-network?showLockedItems=true HTTP/1.1" 404 56 root[get_reply] Error 404 Client Error: Not Found for url: https://api.coursera.org/api/opencourse.v1/course/deep-neural-network?showLockedItems=true getting page https://api.coursera.org/api/opencourse.v1/course/deep-neural-network?showLockedItems=true root[get_reply] The server replied: {"message":"","statusCode":404} root[main] HTTPError 404 Client Error: Not Found for url: https://api.coursera.org/api/opencourse.v1/course/deep-neural-network?showLockedItems=true root[main] HTTPError 404 Client Error: Not Found for url: https://api.coursera.org/api/opencourse.v1/course/deep-neural-network?showLockedItems=true Traceback (most recent call last): File "/mnt/data/ibrouwer2/projects/deep_learning_coursera/my-coursera/coursera-dl/coursera/coursera_dl.py", line 238, in main error_occurred, completed = download_class(args, class_name) File "/mnt/data/ibrouwer2/projects/deep_learning_coursera/my-coursera/coursera-dl/coursera/coursera_dl.py", line 213, in download_class return download_on_demand_class(args, class_name) File "/mnt/data/ibrouwer2/projects/deep_learning_coursera/my-coursera/coursera-dl/coursera/coursera_dl.py", line 140, in download_on_demand_class args.download_notebooks File "/mnt/data/ibrouwer2/projects/deep_learning_coursera/my-coursera/coursera-dl/coursera/extractors.py", line 53, in get_modules page = self._get_on_demand_syllabus(class_name) File "/mnt/data/ibrouwer2/projects/deep_learning_coursera/my-coursera/coursera-dl/coursera/extractors.py", line 66, in _get_on_demand_syllabus page = get_page(self._session, url) File "/mnt/data/ibrouwer2/projects/deep_learning_coursera/my-coursera/coursera-dl/coursera/network.py", line 85, in get_page reply = get_reply(session, url, post=post, data=data, headers=headers) File "/mnt/data/ibrouwer2/projects/deep_learning_coursera/my-coursera/coursera-dl/coursera/network.py", line 47, in get_reply reply.raise_for_status() File "/mnt/data/ibrouwer2/projects/deep_learning_coursera/my-coursera/lib/python3.4/site-packages/requests/models.py", line 939, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.coursera.org/api/opencourse.v1/course/deep-neural-network?showLockedItems=true

    Expected behaviour

    Download some stuff!

    Actual behaviour

    Crash right away

    opened by ibrwr 37
  • Could not authenticate. Cannot login on accounts.coursera.org (Coursera Auth Updated?)

    Could not authenticate. Cannot login on accounts.coursera.org (Coursera Auth Updated?)

    Hi, I am getting an error when trying to download courses today.

    From the looks of it, Coursera might have changed their authentication setup again. I gather this from testing the other 'coursera-dl' project which is also having trouble authenticating.

    System:

    1. Commit: bc09ac2587
    2. OS: OSX Yosemite
    3. Python: 2.7.9
    4. All dependencies installed and updated
    5. --clear-cache flag does not fix the error

    See the error below.

    my-macbook-pro:~ username$ ~/Dropbox/Apps/coursera/coursera-dl -u '[email protected]' -p 'mypassword' --path '/Volumes/Storage/My Videos/Lectures/Coursera' \ls '/Volumes/Storage/My Videos/Lectures/Coursera' Downloading class: ac-003 Starting new HTTPS connection (1): class.coursera.org Starting new HTTPS connection (1): accounts.coursera.org Could not authenticate: Cannot login on accounts.coursera.org. Downloading class: algo-006 Starting new HTTPS connection (1): class.coursera.org Starting new HTTPS connection (1): accounts.coursera.org Could not authenticate: Cannot login on accounts.coursera.org. Downloading class: algo2-003

    I have tried using cookie authentication by exporting the cookie from Firefox using Firebug and get the blow error.

    my-macbook-pro:coursera-dl username$ ./coursera-dl -u '[email protected]' -p 'mypassword' -c '/Users/username/Dropbox/Apps/coursera/cookies.txt' friendsmoneybytes-005 Downloading class: friendsmoneybytes-005 /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_MozillaCookieJar.py:109: UserWarning: cookielib bug! Traceback (most recent call last): File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_MozillaCookieJar.py", line 71, in _really_load line.split("\t") ValueError: need more than 6 values to unpack

    _warn_unhandled_exception() Traceback (most recent call last): File "./coursera-dl", line 6, in coursera_dl.main() File "/Users/username/Dropbox/Apps/coursera-dl/coursera/coursera_dl.py", line 781, in main if download_class(args, class_name): File "/Users/username/Dropbox/Apps/coursera-dl/coursera/coursera_dl.py", line 728, in download_class username=args.username, password=args.password File "/Users/username/Dropbox/Apps/coursera-dl/coursera/cookies.py", line 309, in get_cookies_for_class cookies = find_cookies_for_class(cookies_file, class_name) File "/Users/username/Dropbox/Apps/coursera-dl/coursera/cookies.py", line 224, in find_cookies_for_class cj = get_cookie_jar(cookies_file) File "/Users/username/Dropbox/Apps/coursera-dl/coursera/cookies.py", line 256, in get_cookie_jar cj._really_load(cookies, 'StringIO.cookies', False, False) File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_MozillaCookieJar.py", line 111, in _really_load (filename, line)) cookielib.LoadError: invalid Netscape format cookies file 'StringIO.cookies': '.coursera.org\tTRUE\t/\tFALSE\t__utmc\t158142248'

    opened by hangrymuppet 37
  • [ssl-issues] sslv3 alert handshake failure on Debian System

    [ssl-issues] sslv3 alert handshake failure on Debian System

    After experiencing #323 I switched to your project as it seems to be better maintained and downloaded the master branch. The problem is not fixed for me. But if I replace "AUTH_URL_V3" by "AUTH_URL" in coockies.py, line 116 I can use the downloader.

    Unmodified master branch output:

    $ ./coursera-dl --clear-cache -n ~/.netrc globalaffairsfinal-001
    Downloading class: globalaffairsfinal-001
    Starting new HTTPS connection (1): class.coursera.org
    /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
      InsecurePlatformWarning
    Starting new HTTPS connection (1): www.coursera.org
    /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
      InsecurePlatformWarning
    Traceback (most recent call last):
      File "./coursera-dl", line 6, in <module>
        coursera_dl.main()
      File "/home/lobo32/coursera-dl/coursera/coursera_dl.py", line 932, in main
        result = download_class(args, class_name)
      File "/home/lobo32/coursera-dl/coursera/coursera_dl.py", line 828, in download_class
        username=args.username, password=args.password
      File "/home/lobo32/coursera-dl/coursera/cookies.py", line 339, in get_cookies_for_class
        get_authentication_cookies(session, class_name, username, password)
      File "/home/lobo32/coursera-dl/coursera/cookies.py", line 162, in get_authentication_cookies
        login(session, username, password, class_name=class_name)
      File "/home/lobo32/coursera-dl/coursera/cookies.py", line 117, in login
        headers=headers, allow_redirects=False)
      File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 507, in post
        return self.request('POST', url, data=data, json=json, **kwargs)
      File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 464, in request
        resp = self.send(prep, **send_kwargs)
      File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 576, in send
        r = adapter.send(request, **kwargs)
      File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 431, in send
        raise SSLError(e, request=request)
    requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
    
    bug more-info-needed 
    opened by MatthiasJaeger 33
  • Cannot get the lectures list correctly,

    Cannot get the lectures list correctly, "Found 0 sections and 0 lectures on this page"

    While I fixed the error of authentication failed #298 , I got another problem with which I cannot get the lectures list correctly. The downloader logged in successfully on accounts.couresera.org and tried to download the indroduction page on https://class.coursera.org/lecture_code/lecture/index but failed with a notice that it "Found 0 sections and 0 lectures on this page". I used the option --clear-cache according to the hints,and got the same problem. It's outputs like this:

    Coursera password for [email protected]: 
    Downloading class: sna-003
    Starting new HTTPS connection (1): class.coursera.org
    Starting new HTTPS connection (1): accounts.coursera.org
    Logged in on accounts.coursera.org.
    Starting new HTTPS connection (1): class.coursera.org
    Found authentication cookies.
    Downloaded https://class.coursera.org/sna-003/lecture/index (6590 bytes)
    Found 0 sections and 0 lectures on this page
    The cookies file may be invalid, please re-run with the `--clear-cache` option.
    

    I test the code and find that when the downloader trys to download the indroduction page, it gets nothing but a redirect page that remind the user to "use a modern browser with JavaScript enabled to use coursera",and the downloader parses the page and , of course, it gets none of sections on the page.

    I've tried it to download different courses, and it worked well for a few of them, pgm-003, for example. but I could not find any another course that it works. Actually, we can get the whole correct introduction page of pgm-003 with any tools (wget,axel or programming) and without any authentications, but not for other courses. Being not familiar with authentication technologies, I am really confused.

    opened by fuz-woo 32
  • 0 section and 0 lectures found - Have they changed the login again?

    0 section and 0 lectures found - Have they changed the login again?

    Have they changed the login system one more time? Last week the script was working perfectly, but it doesn't work today.

    $ python ~/repos/coursera/coursera-dl reactive-001 -n  --debug
    root[authenticate_through_netrc] Trying netrc file e:/Home\.netrc
    root[main] Downloading class: reactive-001
    root[get_cookies_from_cache] Loaded cookies from c:\users\XXXX\appdata\local\temp\XXXX_coursera_dl_cache\cookies\[email protected]
    requests.packages.urllib3.connectionpool[_new_conn] Starting new HTTPS connection (1): class.coursera.org
    requests.packages.urllib3.connectionpool[_make_request] "HEAD /reactive-001/class HTTP/1.1" 302 0
    root[do_we_have_valid_cookies] Stale session.
    root[get_authentication_cookies] Already logged in on accounts.coursera.org.
    requests.packages.urllib3.connectionpool[_make_request] "GET /reactive-001/auth/auth_redirector?type=login&subtype=normal HTTP/1.1" 302 0
    requests.packages.urllib3.connectionpool[_make_request] "GET /account/signedin?course_id=971465&r=https%3A%2F%2Fclass.coursera.org%2Freactive-001%2Fauth%2Fauth_redirector%3Ftype%3Dlogin%26subtype%3Dnormal&user_action=class&topic_name=Principles%20of%20Reactive%20Programming HTTP/1.1" 302 0
    requests.packages.urllib3.connectionpool[_new_conn] Starting new HTTPS connection (1): www.coursera.org
    requests.packages.urllib3.connectionpool[_make_request] "GET /account/signedin?course_id=971465&r=https%3A%2F%2Fclass.coursera.org%2Freactive-001%2Fauth%2Fauth_redirector%3Ftype%3Dlogin%26subtype%3Dnormal&user_action=class&topic_name=Principles%20of%20Reactive%20Programming HTTP/1.1" 200 2650
    root[get_authentication_cookies] Found authentication cookies.
    root[get_syllabus_url] Using index mode with page: https://class.coursera.org/reactive-001/lecture/index
    requests.packages.urllib3.connectionpool[_make_request] "GET /reactive-001/lecture/index HTTP/1.1" 302 0
    requests.packages.urllib3.connectionpool[_make_request] "GET /account/signedin?course_id=971465&r=https%3A%2F%2Fclass.coursera.org%2Freactive-001%2Flecture%2Findex&user_action=class&topic_name=Principles%20of%20Reactive%20Programming HTTP/1.1" 302 0
    requests.packages.urllib3.connectionpool[_make_request] "GET /account/signedin?course_id=971465&r=https%3A%2F%2Fclass.coursera.org%2Freactive-001%2Flecture%2Findex&user_action=class&topic_name=Principles%20of%20Reactive%20Programming HTTP/1.1" 200 None
    root[get_syllabus] Downloaded https://class.coursera.org/reactive-001/lecture/index (6613 bytes)
    root[parse_syllabus] Found 0 sections and 0 lectures on this page
    root[parse_syllabus] Probably bad cookies file (or wrong class name)
    

    Let me know if I missed something. I'm willing to provide additional traces (and even do some debugging myself) if necessary.

    Thanks.

    opened by lamarqua 31
  • [ssl-issues] OpenSSL/SSL Issues for Python 2.7.6 users

    [ssl-issues] OpenSSL/SSL Issues for Python 2.7.6 users

    Hello, I still get the same errors as a couple of months ago:

      $ coursera-dl -u -p regmods-030
      Downloading class: regmods-030
      Starting new HTTPS connection (1): class.coursera.org
      /home/me/.local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
      InsecurePlatformWarning
      Starting new HTTPS connection (1): www.coursera.org
      /home/me/.local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
      InsecurePlatformWarning
      Traceback (most recent call last):
      File "/home/me/.local/bin/coursera-dl", line 9, in
      load_entry_point('coursera==0.0.3', 'console_scripts', 'coursera-dl')()
      File "/home/me/.local/lib/python2.7/site-packages/coursera/coursera_dl.py", line 944, in main
      result = download_class(args, class_name)
      File "/home/me/.local/lib/python2.7/site-packages/coursera/coursera_dl.py", line 842, in download_class
      username=args.username, password=args.password)
      File "/home/me/.local/lib/python2.7/site-packages/coursera/cookies.py", line 337, in get_cookies_for_class
      get_authentication_cookies(session, class_name, username, password)
      File "/home/me/.local/lib/python2.7/site-packages/coursera/cookies.py", line 160, in get_authentication_cookies
      login(session, username, password, class_name=class_name)
      File "/home/me/.local/lib/python2.7/site-packages/coursera/cookies.py", line 115, in login
      headers=headers, allow_redirects=False)
      File "/home/me/.local/lib/python2.7/site-packages/requests/sessions.py", line 508, in post
      return self.request('POST', url, data=data, json=json, *kwargs)
      File "/home/me/.local/lib/python2.7/site-packages/requests/sessions.py", line 465, in request
      resp = self.send(prep, *send_kwargs)
      File "/home/me/.local/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
      r = adapter.send(request, **kwargs)
      File "/home/me/.local/lib/python2.7/site-packages/requests/adapters.py", line 431, in send
      raise SSLError(e, request=request)
      requests.exceptions.SSLError: [Errno 1] _ssl.c:510: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
    

    I still have Python 2.7.6 on Ubuntu 14.4. I know it would be better to have Python 2.7.10 but this will not change anytime soon, since this is just the Python version that is in Ubuntu 14.4 has. PLEASE, can this be fixed, so that it works with python 2.7.6 ?

    (As a matter of fact I even tried installing Python 2.7.10, and even though

      $ python --version
      Python 2.7.10
    

    I get the same error.)

    bug more-info-needed 
    opened by Make42 28
  • Course cannot be downloaded due to IndexError

    Course cannot be downloaded due to IndexError

    Downloading class: datasci-001
    Starting new HTTPS connection (1): class.coursera.org
    Starting new HTTPS connection (1): www.coursera.org
    Logged in on www.coursera.org.
    Starting new HTTPS connection (1): class.coursera.org
    Found authentication cookies.
    Downloaded https://class.coursera.org/datasci-001/lecture/index (210692 bytes)
    Introduction
      Appetite_Whetting_Part_1
      Appetite_Whetting_Part_2
      Context
      Dimensions
      This_Course_Part_1
      This_Course_Part_2
      eScience
      Big_Data
      Guest_Lecture-_Biomedical_Informatics
      Logistics
      Twitter_Assignment-_Getting_Started_with_Problem_0_and_Problem_1
    Relational_Databases_Relational_Algebra
      From_Data_Models_to_Databases
      Motivating_Relational_Algebra
      Relational_Algebra_Introduction
      Relational_Algebra_Details-_Union_Diff_Select
      Relational_Algebra_Details-_Project_Cross_Product_Equi-Join
      Relational_Algebra_Details-_Theta-Join
      SQL_for_Data_Science-_Interpreting_Complicated_SQL
      SQL_for_Data_Science-_User-Defined_Functions
    Traceback (most recent call last):
      File "/home/kurt/OpenSource/coursera/coursera-dl", line 1086, in 
        main()
      File "/home/kurt/OpenSource/coursera/coursera-dl", line 1072, in main
        if download_class(args, class_name):
      File "/home/kurt/OpenSource/coursera/coursera-dl", line 1036, in download_class
        sections = parse_syllabus(session, page, args.reverse)
      File "/home/kurt/OpenSource/coursera/coursera-dl", line 491, in parse_syllabus
        assert vtag.a.contents[0], "couldn't get lecture name"
    IndexError: list index out of range
    
    bug more-info-needed 
    opened by kurthuwig 27
  • Make it works (only `-ca` option)

    Make it works (only `-ca` option)

    🚨Please review the guidelines for contributing to this repository.

    Proposed changes

    Nothing much. Just 2 fix in API Coursera, and ulti file.

    Types of changes

    • [x] Bugfix (non-breaking change which fixes an issue)
    • [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)

    Further comments

    This fix help we can use coursera-dl. But only with -ca option (CAUTH value from cookie).

    Reviewers

    If you know the person who can review your code please add a @mention.

    opened by faea726 0
  • fix(sec): upgrade requests to 2.20

    fix(sec): upgrade requests to 2.20

    What happened?

    There are 1 security vulnerabilities found in requests 2.10.0

    What did I do?

    Upgrade requests from 2.10.0 to 2.20 for vulnerability fix

    What did you expect to happen?

    Ideally, no insecure libs should be used.

    The specification of the pull request

    PR Specification from OSCS

    opened by chncaption 0
  • Course with `-` prefix to course name not downloading!

    Course with `-` prefix to course name not downloading!

    Hi,

    Courses with a none alphanumeric prefix do not get downloaded. For instance: https://www.coursera.org/learn/-dyslexia/

    Gets aborted with a message: coursera-dl: error: unrecognized arguments: -dyslexia

    Also tried the course name inside single ('-dyslexia') and double ("-dyslexia") quotes, no go.

    Using the whole url gives:

    $ ./coursera-dl --resume --path=../Specialization/online-learning-design
    -eduators https://www.coursera.org/learn/-dyslexia
    coursera_dl version 0.11.5
    Downloading class: https://www.coursera.org/learn/-dyslexia (1 / 1)
    Error 400 Client Error: Bad Request for url: https://api.coursera.org/api/onDemandCourseMaterials.v2/?q=slug&slug=https://www.coursera.org/learn/-dyslexia&includes=modules%2
    Clessons%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2Citems%2Ctracks%2CgradePolicy&&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2C
    slug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional%2ClearningObjectives)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2Ctr
    ackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cd
    escription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight%2CisRequiredForPassing)%2ConDemandCourseMaterialItems.v2(name%2Cslug%2CtimeCommitment%2
    CcontentSummary%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId%2ClockedStatus%2CitemLockSummary)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedIt
    ems=true getting page https://api.coursera.org/api/onDemandCourseMaterials.v2/?q=slug&slug=https://www.coursera.org/learn/-dyslexia&includes=modules%2Clessons%2CpassableItem
    Groups%2CpassableItemGroupChoices%2CpassableLessonElements%2Citems%2Ctracks%2CgradePolicy&&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2Cslug%2Cdescription%2Cti
    meCommitment%2ClessonIds%2Coptional%2ClearningObjectives)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2CtrackId)%2ConDemandCourse
    MaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cdescription%2CitemIds)%2
    ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight%2CisRequiredForPassing)%2ConDemandCourseMaterialItems.v2(name%2Cslug%2CtimeCommitment%2CcontentSummary%2CisLoc
    ked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId%2ClockedStatus%2CitemLockSummary)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedItems=true
    The server replied: {"msg":"Routing error: Improperly formatted value for parameter 'slug'"}
    HTTPError 400 Client Error: Bad Request for url: https://api.coursera.org/api/onDemandCourseMaterials.v2/?q=slug&slug=https://www.coursera.org/learn/-dyslexia&includes=modul
    es%2Clessons%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2Citems%2Ctracks%2CgradePolicy&&fields=moduleIds%2ConDemandCourseMaterialModules.v1(nam
    e%2Cslug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional%2ClearningObjectives)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%
    2CtrackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name
    %2Cdescription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight%2CisRequiredForPassing)%2ConDemandCourseMaterialItems.v2(name%2Cslug%2CtimeCommitme
    nt%2CcontentSummary%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId%2ClockedStatus%2CitemLockSummary)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLock
    edItems=true
    

    Any idea? Thanks

    opened by zenny 2
  • update OnDemandCourseMaterials api to version 2

    update OnDemandCourseMaterials api to version 2

    change class name to OnDemandCourseMaterialItemsV2 and add update lines 318 and 322 of api.py file

    🚨Please review the guidelines for contributing to this repository.

    Proposed changes

    These commits aim to fix the problem mentioned in issue 834

    Types of changes

    • [x] Bugfix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

    Checklist

    • [x] I have read the CONTRIBUTING doc
    • [x] I agree to contribute my changes under the project's LICENSE
    • [x] I have checked that the unit tests pass locally with my changes
    • [x] I have checked the style of the new code (lint/pep).
    • [x] I have added tests that prove my fix is effective or that my feature works
    • [x] I have added necessary documentation (if appropriate)
    opened by srezasm 0
  • Issue in Parsing syllabus of on-demand course

    Issue in Parsing syllabus of on-demand course

    The following issue pops up in trying to parsing the syllabus of the course: **Error 404 Client Error: Not Found for url: https://api.coursera.org/api/onDemandCourseMaterials.v1/?q=slug&slug=ibm-exploratory-data-analysis-for-machine-learning&includes=moduleIds%2ClessonIds%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2CitemIds%2Ctracks&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2Cslug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2CtrackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cdescription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight)%2ConDemandCourseMaterialItems.v1(name%2Cslug%2CtimeCommitment%2Ccontent%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedItems=true getting page https://api.coursera.org/api/onDemandCourseMaterials.v1/?q=slug&slug=ibm-exploratory-data-analysis-for-machine-learning&includes=moduleIds%2ClessonIds%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2CitemIds%2Ctracks&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2Cslug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2CtrackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cdescription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight)%2ConDemandCourseMaterialItems.v1(name%2Cslug%2CtimeCommitment%2Ccontent%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedItems=true The server replied: Coursera - API Route Does Not Exist

    API Route Does Not Exist

    Edge does not know about this API route.
    Check whether this route is exposed in the routing table.

    HTTPError 404 Client Error: Not Found for url: https://api.coursera.org/api/onDemandCourseMaterials.v1/?q=slug&slug=ibm-exploratory-data-analysis-for-machine-learning&includes=moduleIds%2ClessonIds%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2CitemIds%2Ctracks&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2Cslug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2CtrackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cdescription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight)%2ConDemandCourseMaterialItems.v1(name%2Cslug%2CtimeCommitment%2Ccontent%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedItems=true**

    The course I tried to download was: https://www.coursera.org/learn/ibm-exploratory-data-analysis-for-machine-learning

    opened by Yugeesha 2
Owner
Coursera Downloader
Coursera Downloader
A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.

24 July 2020 Actively soliciting contributers! Ping @ronncc if you would like to help out! pytube pytube is a very serious, lightweight, dependency-fr

pytube 7.9k Jan 2, 2023
A script to automate the process of downloading Markdown and CSV backups of Notion

Automatic-Notion-Backup A script to automate the process of downloading Markdown and CSV backups of Notion. In addition, the data is processed to remo

Jorge Manuel Lozano Gómez 2 Nov 2, 2022
❄️ Don't waste your money paying for new tokens, once you have used your tokens, clean them up and resell them!

TokenCleaner Don't waste your money paying for new tokens, once you have used your tokens, clean them up and resell them! If you have a very large qua

0xVichy 59 Nov 14, 2022
Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

Telegram VCVideoPlayBot An Telegram Bot By @ZauteKm To Stream Videos in Telegram Voice Chat. NOTE: Make sure you have started a VoiceChat in your Grou

Zaute 20 Oct 21, 2022
Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

SUBIN 449 Dec 27, 2022
📢 Video Chat Stream Telegram Bot. Can ⏳ Stream Live Videos, Radios, YouTube Videos & Telegram Video Files On Your Video Chat Of Channels & Groups !

Telegram Video Chat Bot (Beta) ?? Video Chat Stream Telegram Bot ?? Can Stream Live Videos, Radios, YouTube Videos & Telegram Video Files On Your Vide

brut✘⁶⁹ // ユスフ 15 Dec 24, 2022
A Python Instagram Scraper for Downloading Profile's Posts, stories, ProfilePic and See the Details of Particular Instagram Profile.

✔ ✔ InstAstra ⚡ ⚡ ⁜ Description ~ A Python Instagram Scraper for Downloading Profile's Posts, stories, ProfilePic and See the Details of Particular In

null 12 Jun 23, 2022
This bot is created by AJTimePyro and It accepts direct downloading url & then return file as telegram file.

URL Uploader Bot This is the source code of URL Uploader Bot. And the developer of this bot is AJTimePyro, His Telegram Channel & Group. You can use t

Abhijeet 23 Nov 13, 2022
Utility for downloading fanfiction in bulk from the Archive of Our Own

What is this? This is a program intended to help you download fanfiction from the Archive of Our Own in bulk. This program is primarily intended to wo

null 73 Dec 30, 2022
Telegram bot for downloading covid-19 vaccine certificate

cowin-certificate-bot This is the source code of @cowincertbot, A telegram bot inspired by the whatsapp bot implementation of indian government for co

ArUn Pt 30 Oct 7, 2022
Python wrapper for Xeno-canto API 2.0. Enables downloading bird data with one command line

Python wrapper for Xeno-canto API 2.0. Enables downloading bird data with one command line. Supports multithreading

_zza 9 Dec 10, 2022
Python script to extract all Humble Bundle keys and redeem them on Steam automagically.

humble-steam-key-redeemer Python script to extract all Humble keys and redeem them on Steam automagically. This is primarily designed to be a set-it-a

null 74 Jan 8, 2023
A simple python script for rclone. Use multiple Google Service Accounts and cycle through them.

About GSAclone GSAclone is a simple python script for rclone, written with the purpose of using multiple Google service accounts on Google Drive and "

Shiro39 6 Feb 25, 2022
A python script fetches all your starred repositories from your GitHub account and clones them to your server so you will never lose important resources

A python script fetches all your starred repositories from your GitHub account and clones them to your server so you will never lose important resources

Ringo Hoffmann 27 Oct 1, 2022
SimpleTelegramScraper - A python script scrapes accounts from public groups via Telegram API and saves them in a CSV file

SimpleTelegramScraper - the best scraper on GitHub This simple python script scr

Deniz Shabani 12 Oct 6, 2022
VaccineAlarm is a simple python script that allows user to get notified when their desired vaccine doses are available at vaccine centers near them.

Introduction VaccineAlarm is a simple python script that allows user to get notified when their desired vaccine doses are available at vaccine centers

Ankit Tripathi 5 Nov 26, 2021