Skip to content

Instantly share code, notes, and snippets.

@sarahkadar
Created April 28, 2010 13:25
Show Gist options
  • Save sarahkadar/382129 to your computer and use it in GitHub Desktop.
Save sarahkadar/382129 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# encoding: UTF-8
require 'rubygems'
require 'hpricot'
require 'open-uri'
doc = Hpricot(open('http://www.versradio.hu/?module=search&mode=hangzo'))
doc.search('div.listitem').each do |item|
system("curl -o '#{item.search('span.author').html} - #{item.search('span.title').html}.mp3' http://www.versradio.hu/data/audio/#{item.search('span.fileid').html}.mp3")
end
@sarahkadar
Copy link
Author

Hpricot cause I couldn't get Nokogiri to parse this as UTF-8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment