加入CND图片保存逻辑

This commit is contained in:
liuwei
2025-05-07 13:59:25 +08:00
parent 2df93f29f5
commit 0d6e047c5d
4 changed files with 35 additions and 46 deletions

View File

@@ -33,12 +33,12 @@ class ToolMixin(WechatAPIClientBase):
raise UserLoggedOut("请先登录")
async with aiohttp.ClientSession() as session:
json_param = {"Wxid": self.wxid, "AesKey": aeskey, "Cdnmidimgurl": cdnmidimgurl}
json_param = {"Wxid": self.wxid, "FileAesKey": aeskey, "FileNo": cdnmidimgurl}
response = await session.post(f'http://{self.ip}:{self.port}/api/Tools/CdnDownloadImage', json=json_param)
json_resp = await response.json()
if json_resp.get("Success"):
return json_resp.get("Data")
return json_resp.get("Data").get("Image")
else:
self.error_handler(json_resp)