From 101ed11d862c06f09f31a0ab71240919c19a33fa Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 12 Mar 2025 09:35:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=8A=96=E9=9F=B3=E8=A7=86?= =?UTF-8?q?=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 2d1d1bf..26abf7d 100644 --- a/douyin_parser/main.py +++ b/douyin_parser/main.py @@ -127,7 +127,7 @@ class DouyinParser: clean_url = self._clean_url(url) params = {'url': clean_url, 'type': 'json'} - self.LOG.debug("[抖音] 请求API: %s, 参数: %s", api_url, repr(params)) + self.LOG.info("[抖音] 请求API: %s, 参数: %s", api_url, repr(params)) proxy = {"http": self.http_proxy, "https": self.http_proxy} if self.http_proxy else None response = requests.get(api_url, params=params, timeout=30, proxies=proxy) @@ -135,10 +135,11 @@ class DouyinParser: raise DouyinParserError(f"API请求失败,状态码: {response.status_code}") data = response.json() - self.LOG.debug("[抖音] API响应数据: %s", data) + self.LOG.info("[抖音] API响应数据: %s", data) if data.get("code") == 200: result = data.get("data", {}) + self.LOG.info("[抖音] API响应数据result: %s", result) # if result.get('video'): # result['video'] = self._get_real_video_url(result['video']) return self._clean_response_data(result) @@ -180,6 +181,7 @@ class DouyinParser: self.wcf.send_rich_text("bot", "gh_11", title[:30], f"{title[:30]} - {author[:10]}", video_url, cover, message.roomid) + self.LOG.info(f"video_url: {video_url}, title: {title}, author: {author}, cover: {cover}") mp4_path = self.download_stream(video_url, "douyin_parser/down_load_dir/douyin.mp4") self.LOG.info(f"发送抖音视频:{mp4_path}") self.wcf.send_file(mp4_path, message.roomid)