Skip to content

Instantly share code, notes, and snippets.

@csabapalfi
Created March 6, 2012 21:14
Show Gist options
  • Save csabapalfi/1989008 to your computer and use it in GitHub Desktop.
Save csabapalfi/1989008 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

I expanded this code into a bookmarklet.

@csabapalfi
Copy link
Author

Wow. Great!

@markus-seidl
Copy link

I updated (hacked) the bookmarklet to work with the current coursera page https://github.com/ma-ver-ick/Coursera-Video-Downloader-Bookmarklet

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