from Hacker News

Download Coursera videos in batch

by jplehmann on 3/28/12, 1:53 PM with 27 comments

  • by jplehmann on 3/28/12, 2:40 PM

    http://coursera.org is creating some fantastic, free educational videos (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.
    
    Naming is intentionally verbose, so that it will display and sort properly using MX Video on my Andriod phone.

    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.

    Let me know if you like it.

  • by nzmsv on 3/28/12, 6:37 PM

    Some shameless self-promotion: I wrote a Chrome extension for downloading Udacity videos (http://nzmsv.github.com/udacity-dl/). If there's any interest in a batch version I could look into it. Alternatively, feel free to write it and let me know :)
  • by dmn001 on 3/28/12, 5:24 PM

    I use the downthemall firefox extension and to keep the videos in order I add a number to the renaming mask:

      *num*_*name*.*ext*
    
    I like how jplehmann's tool can rename them using the titles on the page.
  • by fvieira on 4/6/12, 2:01 PM

    You can also check my script over here: https://github.com/fvieira/coursera_resources_downloader It has the advantage of not requiring a cookies file, it can authenticate with your user and password. Otherwise, it does pretty much the same as jplehmann's script, although with some minor changes which you might or might not like.

    By the way, congratulations on your script, jplehmann! Wish I had found yours before losing time doing mine...

  • by jeremyarussell on 3/28/12, 4:45 PM

    I'm already using it, after sometime I got a connection forcibly closed by remote host error. I can't access the Coursera website either, not sure why though. (mayhaps a bunch of people suddenly using this script crashed their servers? or they blocked us)

    It's back up, must have been a small glitch. Might I add that I love the fact the script picked up on the video I dropped earlier.

  • by christiangenco on 3/29/12, 9:17 AM

    Nice! I actually found your project last week through google but wrote my own in js (https://gist.github.com/2225519) after struggling with the python dependencies.

    I think coursera really needs to come out with a native solution and a standard way of numbering/organizing videos.

  • by tuxguy on 3/31/12, 7:06 PM

    I have tried all of the projects mentioned in the comments here.

    To me the most simple & quick was this bookmarklet.

    https://github.com/christiangenco/Coursera-Video-Downloader-...

  • by radicade on 3/28/12, 8:47 PM

    Another version that downloads coursera videos, and also optionally downloads slides and subtitles:

    https://github.com/LoganDing/Coursera.org-Downloader

  • by jwr on 3/28/12, 4:43 PM

    Thank heavens! Er, I mean thank you (the OP) for this tool. I already wrote scripts that renamed files to something sane, but this will make my life so much easier.
  • by checkraiser on 3/29/12, 2:38 AM

    Do you know which technologies to create the interactive video lectures (subtitles + quizzes ) like those in Coursera courses ?
  • by themonk on 3/28/12, 4:44 PM

    Thanks a lot, does it skip downloaded videos in next run?
  • by floggit on 3/28/12, 6:59 PM

    Can someone create an iOS app for this please ?
  • by A_A on 3/28/12, 4:12 PM

    this looks sweet. Thanks. I had been manually downloading the vids on my PC, but I hope this tool will now reduce the pain.
  • by pimentel on 3/28/12, 10:25 PM

    How does this work with in-video quizzes?