Skip to content

Instantly share code, notes, and snippets.

@nakajima
Created June 17, 2011 20:34
Show Gist options
  • Select an option

  • Save nakajima/1032281 to your computer and use it in GitHub Desktop.

Select an option

Save nakajima/1032281 to your computer and use it in GitHub Desktop.
##
# Downloads a bunch of Goldeneye N64 videos. You're welcome.
##
require "rubygems"
require "nokogiri"
require "open-uri"
doc = Nokogiri(open("http://www.archive.org/details/GoldenEye_SecretAgent").read)
doc.at('table.fileFormats') \
.search('a') \
.map { |node| node["href"] } \
.select { |path| path =~ /\.mp4/ } \
.reject { |path| path =~ /LQ_512/ } \
.each { |path| system("wget http://www.archive.org" + path); puts "GOT #{path}" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment