Skip to content

Instantly share code, notes, and snippets.

@cwsaylor
Created February 8, 2011 19:28
Show Gist options
  • Save cwsaylor/817026 to your computer and use it in GitHub Desktop.
Save cwsaylor/817026 to your computer and use it in GitHub Desktop.
page = Hpricot( open( 'http://webservices.nextbus.com/service/publicXMLFeed?command=predictions&a=sf-muni&r=23&s=4198&useShortTitles=true' ) )
(page/:predictions/:direction/:prediction).each do |p|
times_to_depart << p.get_attribute("minutes").to_i
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment