lib/takuhai_status/ups.rb in takuhai_status-1.4.0 vs lib/takuhai_status/ups.rb in takuhai_status-1.4.1

- old
+ new

@@ -21,10 +21,10 @@ # HTML中に謎の大量ヌル文字が含まれていてnokogiriのパースが止まる対策 html.gsub!(/\u0000/,'') doc = Nokogiri::HTML.parse(html, uri, "utf-8") begin - state = doc.css('.newstatus #ttc_tt_spStatus h3')[0].text.strip + state = doc.css('.newstatus h3')[0].text.strip begin time = "#{doc.css('.secHead ul li')[0].text.match(/\d{4}\/\d\d\/\d\d \d{1,2}:\d\d/)[0]}+0500)" rescue NoMethodError time = "#{doc.css('.secHead ul li')[0].text.match(/\d{4}\/\d\d\/\d\d/)[0]} 00:00:00+0500)" end