From 274d64aefcba42bb4fa02989b4a0c6aec80657d6 Mon Sep 17 00:00:00 2001 From: crpa33 Date: Wed, 2 Apr 2025 11:59:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86xhs=E6=84=8F=E5=A4=96?= =?UTF-8?q?=E7=9A=84=E8=AF=84=E8=AE=BA=E4=BF=A1=E6=81=AF=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 报错就会打断我,我没辙 --- media_platform/xhs/client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/media_platform/xhs/client.py b/media_platform/xhs/client.py index f3f0828..c1757f2 100644 --- a/media_platform/xhs/client.py +++ b/media_platform/xhs/client.py @@ -415,6 +415,12 @@ class XiaoHongShuClient(AbstractApiClient): num=10, cursor=sub_comment_cursor, ) + + if comments_res is None: + utils.logger.info( + f"[XiaoHongShuClient.get_comments_all_sub_comments] No response found for note_id: {note_id}" + ) + continue sub_comment_has_more = comments_res.get("has_more", False) sub_comment_cursor = comments_res.get("cursor", "") if "comments" not in comments_res: