Created
September 16, 2014 22:45
-
-
Save rochefort/2c4ef6bbc57b76a88d57 to your computer and use it in GitHub Desktop.
chapter5-15-1 p.328
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
diff --git a/chapter5/bond-nokogiri.rb b/chapter5/bond-nokogiri.rb | |
index 62564d0..ff4c740 100644 | |
--- a/chapter5/bond-nokogiri.rb | |
+++ b/chapter5/bond-nokogiri.rb | |
@@ -3,7 +3,7 @@ require 'nokogiri' | |
require 'open-uri' | |
url="http://www.mof.go.jp/jgbs/reference/interest_rate/jgbcm.htm" | |
-reg_pattern="//*[@id='index']/tbody/tr/td/ul/table[3]/tbody/tr" | |
+reg_pattern="//*[@id='index']/tbody/tr/td/ul/table[2]/tbody/tr" | |
doc = Nokogiri::HTML(open(url)) | |
elements = doc.xpath(reg_pattern).last | |
array=[] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment