From 98d11ff3b383844257b604a878c609ffc6cb8425 Mon Sep 17 00:00:00 2001 From: xbayli <63527978+xbayli@users.noreply.github.com> Date: Wed, 8 May 2024 10:36:41 +0800 Subject: [PATCH] Update weather.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除parent --- weather.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weather.py b/weather.py index 60ec272..2830c5b 100644 --- a/weather.py +++ b/weather.py @@ -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'