优化天气插件

This commit is contained in:
liuwei
2025-05-22 11:34:35 +08:00
parent 07b0140256
commit 208a062e18

View File

@@ -172,7 +172,7 @@ 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 geoapi_json['code'] == '404':
return "\n⚠️查无此地!"
elif geoapi_json['code'] != '200':