mirror of
https://github.com/mii443/rbot.git
synced 2025-08-22 15:45:30 +00:00
Changed to use "to_json"
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user