From e04c0f0b748dc48c345c730553f54dce072f6a17 Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 22 May 2025 11:42:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A4=A9=E6=B0=94=E6=8F=92?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/weather/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/weather/main.py b/plugins/weather/main.py index 7f959d1..6dfd346 100644 --- a/plugins/weather/main.py +++ b/plugins/weather/main.py @@ -172,11 +172,10 @@ class WeatherPlugin(MessagePluginInterface): params=params) as response: geoapi_json = await response.json() await conn_ssl.close() - self.LOG.debug(f"geoapi_json: {geoapi_json}") if 'code' not in geoapi_json: - self.LOG.error(f"API响应格式错误,缺少code字段") + self.LOG.debug(f"未查询到城市信息:{city_name},{geoapi_json}") return "" - + if geoapi_json['code'] == '404': return "" elif geoapi_json['code'] != '200':