-
-
Save wfarr/30953 to your computer and use it in GitHub Desktop.
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
require 'rubygems' | |
require 'open-uri' | |
vids = [] | |
f = open('http://feeds.feedburner.com/Rubyconf2008-Confreaks') | |
f.each do |l| | |
l =~ /enclosure url=\"([^\"]+)"/ | |
vids << $1 | |
end | |
vids.compact!.uniq! | |
vids.each do |vid| | |
next if File.exist?(vid.split('/').last) | |
puts "Downloading #{vid}" | |
# Mac OS X doesn't have wget installed by default, use cURL for awesomeness! | |
`curl -O #{vid}` | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment