From 9efbb73615d42ff301d74e48b1c6c0f47ab88f5e Mon Sep 17 00:00:00 2001 From: liuwei Date: Tue, 11 Mar 2025 11:04:34 +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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/douyin_parser/main.py b/douyin_parser/main.py index 62a950a..a6f8dee 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', '未知作者') + if not video_url: raise DouyinParserError("无法获取视频地址") self.send_xml_video(message, title, author, video_url) @@ -192,7 +193,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=3, + f"""UPDATE MSG SET CompressContent = x'{compressed_data}', BytesExtra=x'', type=49, SubType=5, IsSender=0, TalkerId=2 WHERE MsgSvrID={data[0]['MsgSvrID']}""" )