-
-
Save christiangenco/2225519 to your computer and use it in GitHub Desktop.
Download and Organize Coursera videos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("h3.list_header").each(function(sectionIndex){ | |
var sectionName = $(this).text().replace(/Chapter .+ - /,"").replace(/\:/,'-').replace(/^(V|I|X)+\. /,''); | |
$(this).parent().next().find("a.lecture-link").each(function(videoIndex){ | |
var $lectureLink = $(this); | |
var videoName = $.trim($lectureLink.text()); | |
var downloadLink = $lectureLink.attr('href').replace('view','download.mp4'); | |
var cookieHeader = ' --header \"Cookie:'+ document.cookie + '\" '; | |
var directory = (sectionIndex+1) + '. ' + sectionName + '/'; | |
var filename = directory + (videoIndex+1) + '. ' + videoName + '.mp4'; | |
var cmd = 'echo "' + filename + '" && '; | |
cmd += 'mkdir -p "' + directory + '" && '; | |
cmd += 'curl -L -C - ' + cookieHeader + downloadLink + ' -o "' + filename + '"'; | |
console.log(cmd); | |
}); | |
}); null |
Awesome dude & double quick time :)
Impressed & inspired. Keep up the great work.
…On Sat, Mar 31, 2012 at 10:35 AM, Christian Genco < ***@***.*** > wrote:
Done: [Coursera Video Downloader Bookmarklet](https://github.com/christiangenco/Coursera-Video-Downloader-Bookmarklet).
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/2225519
Hi Christian
I am using the coursera video downloader bookmarklet & it works great.
I was wondering if you know of a similar good (as in lightweight) way(bookmarklet, extension, etc) to download udacity videos (which are youtube videos & unlike coursera, not organized all on one page) ?
Thanks,
cnh
Thanks! Glad you like it :D
I'd use something like a Chrome YouTube video downloader extension (a bunch exist; here's one: http://www.chromeextensions.org/other/easy-youtube-video-downloader/ ). I haven't used Udacity as much, so I can't offer any specific advise.
Cool. Thanks a ton Christian.
I have been stalking you on twitter :)
Are you back in the US now ?
If possible, can you email me your email address ( ashish dot makani at
gmail dot com)
Thanks a ton,
cheers
ashish
…On Fri, Jun 1, 2012 at 4:57 PM, Christian Genco < ***@***.*** > wrote:
Thanks! Glad you like it :D
I'd use something like a Chrome YouTube video downloader extension (a
bunch exist; here's one:
http://www.chromeextensions.org/other/easy-youtube-video-downloader/ ). I
haven't used Udacity as much, so I can't offer any specific advise.
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/2225519
Creepy o_O
Not back in the US yet, unfortunately. Currently enjoying a holiday to Sydney :D
Oh ok. I just needed some advice on js stuff.
I want to write a push button bookmarkelet for udacity, just like you did
for coursera.
Also maybe extend your coursera thingy, to include other sections (pdf
lecture notes), with optional check boxes
I hate chrome extensions with a passion. On my machine, chrome runs very
slow & the fact that all chrome extensions must consume a ton of memory &
need access to all my chrome data, is so lame.
</rant> :)
…On Fri, Jun 1, 2012 at 5:09 PM, Christian Genco < ***@***.*** > wrote:
Creepy o_O
Not back in the US yet, unfortunately. Currently enjoying a holiday to
Sydney :D
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/2225519
Haha, fair enough. What can I assist you with sir?
On Fri, Jun 1, 2012 at 7:46 PM, cnh <
[email protected]
… wrote:
Oh ok. I just needed some advice on js stuff.
I want to write a push button bookmarkelet for udacity, just like you did
for coursera.
Also maybe extend your coursera thingy, to include other sections (pdf
lecture notes), with optional check boxes
I hate chrome extensions with a passion. On my machine, chrome runs very
slow & the fact that all chrome extensions must consume a ton of memory &
need access to all my chrome data, is so lame.
</rant> :)
On Fri, Jun 1, 2012 at 5:09 PM, Christian Genco <
***@***.***
> wrote:
>
> Creepy o_O
>
> Not back in the US yet, unfortunately. Currently enjoying a holiday to
> Sydney :D
> ---
>
> Reply to this email directly or view it on GitHub:
> https://gist.github.com/2225519
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/2225519
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Done: Coursera Video Downloader Bookmarklet.