Changed to use "to_json"

This commit is contained in:
takumi091111
2017-10-14 12:39:40 +09:00
parent b1bc125624
commit 3c1946b2a7

View File

@ -15,7 +15,7 @@ module Bot
uri = URI.parse(JPN_WEATHER_FORECAST + "#{id}.js")
jsonp = Net::HTTP.get(uri)
# JSONP -> JSONに変換
json = JSON.load(jsonp.match(/\.callback\((.*)\)/)[1])
json = JSON.load(jsonp.to_json)
weather = nil