From 1d224999afacf9c60a4fada7b1704cc855e17822 Mon Sep 17 00:00:00 2001 From: HIRO <18324330559@163.com> Date: Thu, 13 Jun 2024 15:57:09 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BA=8C=E7=BA=A7=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E7=88=AC=E5=8F=96bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- media_platform/kuaishou/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/media_platform/kuaishou/client.py b/media_platform/kuaishou/client.py index 591a180..f643171 100644 --- a/media_platform/kuaishou/client.py +++ b/media_platform/kuaishou/client.py @@ -247,9 +247,10 @@ class KuaiShouClient(AbstractApiClient): comments_res = await self.get_video_sub_comments( photo_id, root_comment_id, sub_comment_pcursor ) - sub_comment_pcursor = comments_res.get("pcursor", "no_more") + vision_sub_comment_list = comments_res.get("visionSubCommentList",{}) + sub_comment_pcursor = vision_sub_comment_list.get("pcursor", "no_more") - comments = comments_res.get("subComments", []) + comments = vision_sub_comment_list.get("subComments", {}) if callback: await callback(photo_id, comments) await asyncio.sleep(crawl_interval)