Created
October 3, 2012 06:47
-
-
Save Kazuma/3825448 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'open-uri' | |
require 'nokogiri' | |
wishlist_url = '' | |
html = Nokogiri::HTML(open(wishlist_url), nil, 'sjis') | |
name = html.at('//div[@id="profile"]/h1').text | |
birthday = html.at('//div[@id="profile"]/div[@id="profileInfo"]/table/tr[3]/td').text | |
puts name, birthday |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
がいいかなー。
// から始まるとxpathと勝手に認識してくれた気がする