Created
July 29, 2011 12:21
-
-
Save thegcat/1113710 to your computer and use it in GitHub Desktop.
Menüs von der stwdo Seite scrapen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%w(open-uri rubygems nokogiri).each{|m| require m} | |
Nokogiri::HTML(open("http://www.stwdo.de/index.php?id=102")).css('table.SpeiseplanHeute tr').inject({}) {|m,r| m.merge((c=r.css('td').collect(&:content))[0] => c[1])}.delete_if {|k,v| k.nil?}.each {|k,v| puts "#{k}: #{v}"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment