mirror of
https://github.com/RYDE-WORK/MediaCrawler.git
synced 2026-02-04 07:36:59 +08:00
处理xhs意外的评论信息为空的情况
报错就会打断我,我没辙
This commit is contained in:
parent
a39b571d27
commit
274d64aefc
@ -415,6 +415,12 @@ class XiaoHongShuClient(AbstractApiClient):
|
|||||||
num=10,
|
num=10,
|
||||||
cursor=sub_comment_cursor,
|
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_has_more = comments_res.get("has_more", False)
|
||||||
sub_comment_cursor = comments_res.get("cursor", "")
|
sub_comment_cursor = comments_res.get("cursor", "")
|
||||||
if "comments" not in comments_res:
|
if "comments" not in comments_res:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user