Skip to content

Instantly share code, notes, and snippets.

@matpalm
Forked from csabapalfi/videos.js
Created March 8, 2012 05:34
Show Gist options
  • Save matpalm/1998930 to your computer and use it in GitHub Desktop.
Save matpalm/1998930 to your computer and use it in GitHub Desktop.
Download Coursera videos
javascript:(function(){
$('a.lecture-link').each(function (index){
var $lectureLink = $(this);
var downloadLink = $lectureLink.attr('href').replace('view','download.mp4');
var downloadName = '\"' + (index+1) + '.' + $lectureLink.text().trim() + '.mp4\"';
var cookieHeader = ' --header \"Cookie:'+ document.cookie + '\" ';
console.log('curl -L ' + cookieHeader + downloadLink + ' > ' + downloadName);
});
})();
@christiangenco
Copy link

Ahh yes! This is exactly what I've been looking for...

@matpalm
Copy link
Author

matpalm commented Mar 25, 2012

thank csabapalfi, i just forked it :D

@christiangenco
Copy link

I expanded this code into a bookmarklet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment