The Best Way to Download Coursera Study Material on Fedora 20

MOOCs have completely changed how education works in modern society. The Coursera is my favorite MOOC platform. They have an excellent set of courses designed for beginners and experts alike.

In this tutorial I am going to discuss the best and the easiest way to download videos and other material from Coursera with help of a simple setup and an alias for quick download.

I am using Fedora 20 for following tutorial. I personally don’t like to use sudo command unless not needed and neither do I like to use alternate package installer other than supplied by the distribution. Hence, I am going to create a Python virtual environment and install the Coursera script in it.

Install package required for creating python virtual environment.

yum install python-virtualenv.noarch

Create a directory and virtual environment.

We will create Coursera folder which will contain both all your courses and virtual environment.

mkdir -p Coursera/coursera-env
virtualenv Coursera/coursera-env

Activate and install the python script using pip.

We will be using a python script coursera-dl by Dirk Gorissen.

source Coursera/coursera-env/bin/activate
pip install coursera-dl

For ease of use, create a ~/.netrc and save your username and password in following format.

machine coursera-dl

Download and deactivate when done.

Now we are ready to download our favorite Coursera course. Make sure you log-in in your Coursera course and accept the honor code for first time before using the script.

coursera-dl -d Coursera androidapps101-001

-d download to folder
Course version can be found in the link androidapps101-001.

Setting up .bashrc alias.

nano ~/.bashrc
alias apps101='source oursera/coursera-env/bin/activate && coursera-dl -d Coursera androidapps101-001 && deactivate'

Next time you want to update your Android course all you have to do is run apps101 in your favorite terminal.

If you face any problems do make sure to open a bug report at Github Coursera-dl page.

Special thanks to Dirk Gorissen for working on Coursera-dl.