Skip to content
Script for downloading videos and naming them.
Pull request Compare This branch is 1 commit ahead, 925 commits behind coursera-dl:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Coursera Downloader

Coursera ( is creating some fantastic, free educational
videos. This script allows one to batch download videos for a Coursera class.
Given a class name and related cookie file, it scrapes the course listing page
to get the week and class names, and then downloads the related videos into
appropriately named files and directories.  

Why is this helpful?  Before I was using wget, but I had the following problems:

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

Naming is somewhat verbose, so that it will display and sort properly using MX
Video on my Andriod phone.

Inspired in part by youtube-dl ( by which I've
downloaded many other good videos such those from Khan Academy.  


Requires Python 2.x (where x >= 5) and a free Coursera account.

1. Install any missing dependencies.

  1a. Beautiful Soup 3 --
    Ubuntu/Debian: sudo apt-get install python-beautifulsoup 
    Other*: easy_install BeautifulSoup

  1b.  Argparse --
    (Not necessary if Python version >= 2.7)
    Ubuntu/Debian: sudo apt-get install python-argparse
    Other*: easy_install argparse

  * To install "easy_install"
    Ubuntu: sudo apt-get install python-setuptools

2. Create a account and login.

3. Locate or export your Netscape-style cookies file with a browser extension.
    Chrome: Cookie.txt Export
    Firefox: Export Cookies 1.2

4. Run the script to download the videos.
    e.g. coursera-dl -c cookies.txt saas

Tested on:
  - Ubuntu/Python 2.6.5
  - Win7/Python2.5 (Cygwin)


If it's finding 0 sections, you probably have a bad cookies file.
Use -l listing.html and then examine that file -- if it's the non-logged-in
page then this is definitely your problem.

  coursera-dl -c cookies.txt saas
  coursera-dl -c cookies.txt -l listing.html -o saas --skip-download

Send any questions, comments, or problems to:
  John Lehmann: first last at geemail dotcom or @jplehmann
Something went wrong with that request. Please try again.