Skip to content

Commit fa63919

Browse files
author
Anonymous Committer
committed
refactor: edit xiaohongshu.get_note_comment_v2 args
1 parent 108163a commit fa63919

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

justoneapi/apis/xiaohongshu.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,16 @@ def get_note_detail_v8(self, note_id: str):
5151
}
5252
return request_util.get_request(url, params)
5353

54-
def get_note_comment_v2(self, note_id: str, last_cursor: str = None):
54+
def get_note_comment_v2(self, note_id: str, last_cursor: str = None, sort: str = "latest"):
5555
url = f"{self.base_url}/api/xiaohongshu/get-note-comment/v2"
5656
params = {
5757
"token": self.token,
5858
"noteId": note_id,
5959
}
6060
if last_cursor:
6161
params["lastCursor"] = last_cursor
62+
if sort:
63+
params["sort"] = sort
6264

6365
has_next_page = False
6466
result, data, message = request_util.get_request_page(url, params)

0 commit comments

Comments
 (0)