Giter VIP home page Giter VIP logo

coursera's Introduction

Coursera Downloader
-------------------

Coursera (http://coursera.org) is creating some fantastic, free educational
videos (e.g., algorithms, machine learning, natural language processing, SaaS).
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.

DownloadThemAll can also work, but this provides better names.

Features:
  * Intentionally detailed names, so that it will display and sort properly
    using MX Video on my Andriod phone.
  * Regex-based section (week) and video name filters to download only certain
    resources.
  * Tested on both Linux and Windows.

Inspired in part by youtube-dl (http://rg3.github.com/youtube-dl) by which I've
downloaded many other good videos such those from Khan Academy.  


Directions
----------

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

1. Install any missing dependencies.

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

  1b. Argparse -- http://pypi.python.org/pypi/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
    Windows: http://pypi.python.org/pypi/setuptools

  1c. wget (needed on Windows)
    http://sourceforge.net/projects/gnuwin32/files/wget/1.11.4-1/wget-1.11.4-1-setup.exe/
    This is a temporary workaround as currently the python download 
    has a problem.

2. Create a Coursera.org account and login.
    e.g. http://saas-class.org

3. Locate or export your Netscape-style cookies file with a browser extension.
    Chrome: Cookie.txt Export
      https://chrome.google.com/webstore/detail/lopabhfecdfhgogdbojmaicoicjekelh
    Firefox: Export Cookies 1.2
      https://addons.mozilla.org/en-US/firefox/addon/export-cookies/

4. Run the script to download the videos.
    Linux:
      coursera-dl saas -c cookies.txt
    # filter by section name
      coursera-dl saas -c cookies.txt -sf "Chapter_Four"
    # filter by video name
      coursera-dl saas -c cookies.txt -vf "3.1_"
    Windows:
      You need to use wget right now.
      coursera-dl saas -c cookies.txt -w C:\...\wget.exe


Troubleshooting
---------------

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.

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


Contact
-------
Send any questions, comments, or problems to:
  John Lehmann: first last at geemail dotcom or @jplehmann

coursera's People

Contributors

jplehmann avatar

Stargazers

Saroj Maharjan avatar

Watchers

Saroj Maharjan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.