Skip to content

Instantly share code, notes, and snippets.

@elecnix
Created November 29, 2008 01:07
Show Gist options
  • Save elecnix/30142 to your computer and use it in GitHub Desktop.
Save elecnix/30142 to your computer and use it in GitHub Desktop.
Downloads Podcasts from nofluffjuststuff.com
#!/usr/bin/ruby
# Downloads Podcasts from www.nofluffjuststuff.com
require 'rubygems'
require 'mechanize'
agent = WWW::Mechanize.new do |a|
a.user_agent_alias = 'Mac Safari'
end
archive = agent.get("http://www.nofluffjuststuff.com/podcasts.jsp")
mp3s = archive.links.select {|link|
begin
link.uri.to_s.include? ".mp3"
rescue
puts "Error: #{link}"
end
}
mp3s.each do |link|
puts "Downloading #{link.uri}"
`wget -q -N http://www.nofluffjuststuff.com#{link.uri}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment