From f5add6b0616780b1ecc180e2ac9ff4b29e25d006 Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 29 May 2025 16:56:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A6=96=E5=B8=A7=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=B2=A1=E4=BC=A0=E5=85=A5?= =?UTF-8?q?=E9=A6=96=E5=B8=A7=EF=BC=8C=E5=88=99=E6=8F=90=E5=8F=96=E9=A6=96?= =?UTF-8?q?=E5=B8=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wechat_ipad/client/message.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wechat_ipad/client/message.py b/wechat_ipad/client/message.py index 6eea857..d9a91e3 100644 --- a/wechat_ipad/client/message.py +++ b/wechat_ipad/client/message.py @@ -235,7 +235,7 @@ class MessageMixin(WechatAPIClientBase): if not has_image: first_frame = _get_first_frame_bytes(video, f"frame_{int(time.time())}.jpg") if first_frame: - image = first_frame + image = Path(first_frame) elif isinstance(video, os.PathLike): video_path = Path(video) if not video_path.exists(): @@ -249,7 +249,7 @@ class MessageMixin(WechatAPIClientBase): if not has_image: first_frame = _get_first_frame(video_path, f"frame_{int(time.time())}.jpg") if first_frame: - image = first_frame + image = Path(first_frame) else: raise ValueError("video should be str, bytes, or path") # 获取视频时长