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':