From b8a02580f2096de54e3fcb65332e9531b2333f45 Mon Sep 17 00:00:00 2001 From: liuwei Date: Tue, 11 Mar 2025 11:11:17 +0800 Subject: [PATCH] =?UTF-8?q?feature=EF=BC=9A=E6=8A=96=E9=9F=B3=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E9=93=BE=E6=8E=A5=E8=BD=AC=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- douyin_parser/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/douyin_parser/main.py b/douyin_parser/main.py index a6f8dee..0fc28d6 100644 --- a/douyin_parser/main.py +++ b/douyin_parser/main.py @@ -125,6 +125,7 @@ class DouyinParser: video_url = video_info.get('video', '') title = video_info.get('title', '无标题') author = video_info.get('name', '未知作者') + cover = video_info.get('cover', '') if not video_url: raise DouyinParserError("无法获取视频地址") @@ -136,11 +137,12 @@ class DouyinParser: def send_xml_video(self, message: WxMsg, title, author, video_url): + video_title = f"{title[:30]} - {author[:10]}" if author else title[:40], xml_message = f""" - {title} @{author} + {video_title} 点击观看无水印视频 view 5 @@ -193,7 +195,7 @@ class DouyinParser: data = self.wcf.query_sql('MSG0.db', "SELECT * FROM MSG where type = 49 limit 1") self.wcf.query_sql('MSG0.db', - f"""UPDATE MSG SET CompressContent = x'{compressed_data}', BytesExtra=x'', type=49, SubType=5, + f"""UPDATE MSG SET CompressContent = x'{compressed_data}', BytesExtra=x'', type=49, SubType=3, IsSender=0, TalkerId=2 WHERE MsgSvrID={data[0]['MsgSvrID']}""" )