forked from coursera-dl/coursera-dl
-
Notifications
You must be signed in to change notification settings - Fork 0
Script for downloading Coursera.org videos and naming them.
freetstar/coursera
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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
About
Script for downloading Coursera.org videos and naming them.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published