Skip to content

Instantly share code, notes, and snippets.

@dce
Created May 8, 2009 20:21
Show Gist options
  • Save dce/108984 to your computer and use it in GitHub Desktop.
Save dce/108984 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
# Download all MP3 files linked from a given URL
require "open-uri"
url = ARGV.first
data = open(url)
data.read.scan(/href="(.*mp3)"/).each do |filename|
`curl -O #{url}#{filename.first}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment