lib/takuhai_status/ups.rb in takuhai_status-1.1.3 vs lib/takuhai_status/ups.rb in takuhai_status-1.2.0
- old
+ new
@@ -14,10 +14,10 @@
return !!(@state =~ /配達済み/)
end
private
def check
- uri = "http://www.ups.com/WebTracking/processInputRequest?loc=ja_JP&Requester=NES&tracknum=#{@key}"
+ uri = "https://www.ups.com/WebTracking/processInputRequest?loc=ja_JP&Requester=NES&tracknum=#{@key}"
html = open(uri, &:read)
# HTML中に謎の大量ヌル文字が含まれていてnokogiriのパースが止まる対策
html.gsub!(/\u0000/,'')
doc = Nokogiri::HTML.parse(html, uri, "utf-8")