Skip to content

Instantly share code, notes, and snippets.

@alecgorge
Last active December 18, 2015 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alecgorge/5792180 to your computer and use it in GitHub Desktop.
Save alecgorge/5792180 to your computer and use it in GitHub Desktop.
A script to run from the console that generates a wget compatible list of downloads of the WWDC2013 releases, categorized by track. You can change PDF to HD or SD to download videos.
(function ($) {
return $('a').filter(function () {
return $(this).text() == "PDF";
}).map(function () {
var dl_free_name = $(this).attr('href').substring(0, $(this).attr('href').length - 5);
var ext = dl_free_name.substring(dl_free_name.length - 3);
var track = $(this).parents('.session').find('.track').text();
var title = $(this).parents('.session').find('.title').text().replace(/[^a-zA-Z0-9-_ ]+/g, '');
return 'wget "' + dl_free_name + '" -O "[' + track + '] ' + title + '.' + ext + '"';
}).toArray().join("\n");
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment