Skip to content

Instantly share code, notes, and snippets.

@csabapalfi
Created March 6, 2012 21:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • 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);
});
})();
@matpalm
Copy link

matpalm commented Mar 8, 2012

win

@csabapalfi
Copy link
Author

Thanks!
Now your fork is the first on Google. :)

@christiangenco
Copy link

Ahh thank you so much! This is precisely what I've been looking for.

@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