« ^ »

Livedoor Weather Hacksで天気を取得する

所要時間: 約 1分

http://weather.livedoor.com/weather_hacks/webservice

import json
import requests

city = "140010"
url = 'http://weather.livedoor.com/forecast/webservice/json/v1?city=%s' % city

response = requests.get(url)
weather = response.json()
print(weathe)