Skip to content

Instantly share code, notes, and snippets.

View matpalm's full-sized avatar
🎯
Focusing

mat kelcey matpalm

🎯
Focusing
View GitHub Profile
@matpalm
matpalm / videos.js
Created March 8, 2012 05:34 — forked from csabapalfi/videos.js
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);
});
})();