Created
September 3, 2009 03:46
-
-
Save udzura/180121 to your computer and use it in GitHub Desktop.
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
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
begin | |
doc = Nokogiri::HTML(open("http://www.ruby-lang.org/ja/")) | |
nil # irbでの大量返り血対策 | |
end | |
puts (doc/"div#logo"/:img).first.attributes["alt"] | |
#=> Ruby - A Programmer's Best Friend |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment