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']}""" )