Skip to content

Instantly share code, notes, and snippets.

@oki
Created February 22, 2009 13:49
Show Gist options
  • Select an option

  • Save oki/68473 to your computer and use it in GitHub Desktop.

Select an option

Save oki/68473 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/ruby
require 'rubygems'
require 'open-uri'
require 'hpricot'
require 'pp'
html = open('http://eska.pl/index.php?page=g20_voting').read
doc = Hpricot(html)
doc.at('table.goraca20').search('tr') do |e|
lp = e.at('td').inner_text rescue next
artist = e.at('td:nth-child(1)').inner_text.strip
title = e.at('td:nth-child(2)').inner_text.strip
puts "#{lp} #{artist} - #{title}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment