Update weather.py

删除parent
pull/25/head
xbayli 5 months ago committed by GitHub
parent c3982edd29
commit 98d11ff3b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      weather.py

@ -31,8 +31,9 @@ r = requests.get(
d = json.loads(r.text)
result2 = json.loads(r.text)['cityInfo']
#参数更新 删除parent
msg = (
f' 城市:{d["cityInfo"]["parent"]} {d["cityInfo"]["city"]}\n'
f' 城市:{d["cityInfo"]["city"]}\n'
f' 日期:{d["data"]["forecast"][0]["ymd"]} {d["data"]["forecast"][0]["week"]}\n'
f' 天气:{d["data"]["forecast"][0]["type"]}\n'
f' 温度:{d["data"]["forecast"][0]["high"]} {d["data"]["forecast"][0]["low"]}\n'

Loading…
Cancel
Save