Skip to content

Commit

Permalink
Update weather.py
Browse files Browse the repository at this point in the history
删除parent
  • Loading branch information
xbayli authored May 8, 2024
1 parent c3982ed commit 98d11ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ def Push(contents):
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'
Expand Down

0 comments on commit 98d11ff

Please sign in to comment.