Created
May 8, 2009 20:21
-
-
Save dce/108984 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/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