增加微信聊天中图片获取能力,较之前的微信图片仅提供缩略图的情况,改善为获取微信聊天中实际图片大小,方便后续 ocr 或者 llm vision 识别聊天图片内容。

This commit is contained in:
Ethan
2025-02-24 20:18:35 +08:00
parent c86602ebaf
commit 91ad7944de

View File

@@ -54,7 +54,7 @@ async def get_gewechat_image_base64(
if resp_data.get("ret") != 200:
raise Exception(f"获取gewechat图片下载链接失败: {resp_data}")
image_url = f"{gewechat_url}{resp_data['data']['fileUrl']}"
image_url = f"{gewechat_url}/{resp_data['data']['fileUrl']}"
# 下载图片内容
async with session.get(image_url, headers=headers) as img_response: