Skip to content

Instantly share code, notes, and snippets.

@tuna2134
Created May 9, 2022 08:36
Show Gist options
  • Save tuna2134/86040e9e15b6b36df69d453f91455ec2 to your computer and use it in GitHub Desktop.
Save tuna2134/86040e9e15b6b36df69d453f91455ec2 to your computer and use it in GitHub Desktop.
import requests
r = requests.get(
"https://www.jma.go.jp/bosai/forecast/data/forecast/270000.json"
)
data = r.json()[0]
print("発表管区:{}".format(data["publishingOffice"]))
timeSeries = data["timeSeries"][0]
print("発表時間:{}".format(timeSeries["timeDefines"][1]))
area = timeSeries["areas"][0]
print("天気:{}".format(area["weathers"][1]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment