修复登陆时间过长的问题

This commit is contained in:
EillesWan 2024-11-17 13:27:46 +08:00
parent 3e0ddccb5a
commit b44ac220df

View File

@ -85,7 +85,7 @@ async def update_yanlun():
nonebot.logger.info("正在获取言·论信息")
try:
async with aiohttp.ClientSession() as client:
resp = await client.get(yanlun_path)
resp = await client.get(yanlun_path, timeout=15)
yanlun_texts = (await resp.text()).strip("\n").split("\n")
except (ConnectionError, aiohttp.ClientError, aiohttp.WebSocketError) as err:
nonebot.logger.warning("读取言·论信息发生 客户端或通道 错误:\n{}".format(err))