Skip to content

Instantly share code, notes, and snippets.

@rochefort
Created September 16, 2014 22:45
Show Gist options
  • Save rochefort/2c4ef6bbc57b76a88d57 to your computer and use it in GitHub Desktop.
Save rochefort/2c4ef6bbc57b76a88d57 to your computer and use it in GitHub Desktop.
chapter5-15-1 p.328
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