Skip to content

Instantly share code, notes, and snippets.

@pjaspers
Created May 3, 2010 20:27
Show Gist options
  • Save pjaspers/388544 to your computer and use it in GitHub Desktop.
Save pjaspers/388544 to your computer and use it in GitHub Desktop.
Check the wk snookerfinal score
#!/usr/bin/env ruby
require 'rubygems'
require 'open-uri'
require 'hpricot'
doc = open("http://news.bbc.co.uk/sport2/hi/other_sports/snooker/8620811.stm") { |f| Hpricot(f) }
puts (doc/"td.storybody").at("p:nth(4)").to_plain_text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment