Skip to content

Instantly share code, notes, and snippets.

@KTamas
Created April 28, 2010 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KTamas/382129 to your computer and use it in GitHub Desktop.
Save KTamas/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
@KTamas
Copy link
Author

KTamas commented Apr 28, 2010

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