Skip to content

Instantly share code, notes, and snippets.

@gilesbowkett
Forked from seanstickle/ruby_conf_vids.rb
Created December 2, 2008 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save gilesbowkett/30980 to your computer and use it in GitHub Desktop.
Save gilesbowkett/30980 to your computer and use it in GitHub Desktop.
require "rubygems"
require "hpricot"
require "open-uri"
url = "http://feeds.feedburner.com/Rubyconf2008-Confreaks"
(Hpricot(open url)/:enclosure).map {|x| x.attributes["url"]}.uniq.each do |vid|
filename = vid.gsub(/http:.+\//, '')
filename.gsub!(/-/, "_")
next if File.exist?(filename)
puts "Downloading #{vid}"
puts filename
`curl #{vid} > #{filename}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment