Coursera is an American website that offers free online courses from various universities around the world. The courses cover a wide range of fields, which range from Humanities to Computer Science.

Coursera Downloader is a small utility that lets you easily bulk download and rename lecture materials (e.g. Videos, ppt, etc) provided that you have enrolled in at least one class using a free Coursera account.

In order to use Coursera Downloader, you must install the following dependencies:

sudo apt-get install python-bs4 python-setuptools

To download Videos from Coursera, you need to get Coursera Downloader source code from Github:

cd ~/Downloads
git clone git://github.com/jplehmann/coursera.git



You can easily invoke the coursera-dl executable using the following commands:

cd ./coursera
coursera-dl -u USER -p PASSWORD COURSENAME


NOTE: You must get the COURSENAME from the course URL like so:
https://class.coursera.org/COURSENAME/class/index

Example:


The URL of the Fundamentals of Electrical Engineering course is:

https://class.coursera.org/eefun-001/class/index
In this case, the COURSENAME is eefun-001. So to download this course, simply enter the following command in a terminal:

coursera-dl -u USER -p PASSWORD eefun-001

You can also specify the download path by using this command:

coursera-dl -u USER -p PASSWORD --path=DIR_PATH eefun-001

To make Coursera Downloader remember your username and password, you need to create a file called ~/.netrc:

touch ~/.netrc

Open this file in your favorite text editor, then add the following line to it:

machine coursera-dl login <USER> password <PASSWORD>


To launch Coursera Downloader with ~/.netrc support, run the following command in a terminal:

coursera-dl -n --path=DIR_PATH COURSENAME

For more usage examples, visit the project page @Github.

Comments