Skip to content

Instantly share code, notes, and snippets.

@jamesbrooks
Created June 10, 2010 00:43
Show Gist options
  • Save jamesbrooks/432417 to your computer and use it in GitHub Desktop.
Save jamesbrooks/432417 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'rubygems'
require 'nokogiri'
require 'open-uri'
doc = Nokogiri::HTML(open('http://www.sportingpulse.com/comp_info.cgi?a=FIXTURE&compID=107624&c=1-4401-0-0-0'))
against = doc.xpath('//*[text()="Owned"]').first.xpath('../../..//b[text()!="Owned"]').first.text
time = doc.xpath('//*[text()="Owned"]').first.xpath('../../../td').first.inner_html.gsub(/\302\240/, ' ').gsub('<br>', ', ')
puts "Owned play #{against} at #{time}\n\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment