Skip to content

Instantly share code, notes, and snippets.

@kenmickles
Last active December 26, 2015 19:49
Show Gist options
  • Save kenmickles/7203799 to your computer and use it in GitHub Desktop.
Save kenmickles/7203799 to your computer and use it in GitHub Desktop.
Download all episodes of a podcast
require 'open-uri'
require 'nokogiri'
url = "http://casbah.podomatic.com/rss2.xml"
open(url) do |rss|
doc = Nokogiri::XML(rss)
doc.xpath("//item").each do |item|
puts `wget -nc "#{item.xpath('enclosure').attr('url')}"`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment