Skip to content

Commit 86ceb77

Browse files
TonwedReaJason
authored andcommitted
add xsec_token for get_note_all_comments
1 parent 613036c commit 86ceb77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: xhs/core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ def get_note_sub_comments(
538538
}
539539
return self.get(uri, params)
540540

541-
def get_note_all_comments(self, note_id: str, crawl_interval: int = 1):
541+
def get_note_all_comments(self, note_id: str, crawl_interval: int = 1, xsec_token: str = ""):
542542
"""get note all comments include sub comments
543543
544544
:param crawl_interval: crawl interval for fetch
@@ -549,7 +549,7 @@ def get_note_all_comments(self, note_id: str, crawl_interval: int = 1):
549549
comments_has_more = True
550550
comments_cursor = ""
551551
while comments_has_more:
552-
comments_res = self.get_note_comments(note_id, comments_cursor)
552+
comments_res = self.get_note_comments(note_id, comments_cursor, xsec_token)
553553
comments_has_more = comments_res.get("has_more", False)
554554
comments_cursor = comments_res.get("cursor", "")
555555
comments = comments_res["comments"]

0 commit comments

Comments
 (0)