Permalink
Browse files

remove implicit kconv use

  • Loading branch information...
darashi committed Feb 28, 2010
1 parent e04c2df commit d68b8608df1bdbaddf01aef97c7b1ae4def3bb51
Showing with 4 additions and 2 deletions.
  1. +2 −1 tools/update_ip_addresses_au.rb
  2. +2 −1 tools/update_ip_addresses_willcom.rb
@@ -6,10 +6,11 @@
require 'pp'
require 'rubygems'
require 'hpricot'
+require 'nkf'
ips = []
-src = open("http://www.au.kddi.com/ezfactory/tec/spec/ezsava_ip.html").read.toutf8
+src = NKF.nkf("-m0 -Sw", open("http://www.au.kddi.com/ezfactory/tec/spec/ezsava_ip.html").read)
doc = Hpricot(src)
(doc/'//table').each do |table|
trs = (table/'tr')
@@ -3,8 +3,9 @@
require 'open-uri'
require 'pp'
+require 'nkf'
-src = open("http://www.willcom-inc.com/ja/service/contents_service/create/center_info/index.html").read.toutf8
+src = NKF.nkf("-m0 -Sw", open("http://www.willcom-inc.com/ja/service/contents_service/create/center_info/index.html").read)
src.sub!(%r{^.*<b>Webアクセス時のIPアドレス帯域</b>(.+?)</table>.*$}m, '\\1')
ips = src.scan(/(\d+\.\d+\.\d+\.\d+\/\d+)/).flatten

0 comments on commit d68b860

Please sign in to comment.