Skip to content

xhs_like_feed ​

点赞或取消点赞笔记。

参数 ​

参数类型必填说明
noteIdstring是笔记 ID
xsecTokenstring是安全令牌
unlikeboolean否是否取消点赞(默认 false)
accountstring否使用的账号
accountsstring[] | "all"否多账号操作

返回值 ​

单账号 ​

json
{
  "success": true,
  "action": "like",
  "noteId": "xxx"
}

多账号 ​

json
[
  {
    "account": "账号1",
    "success": true,
    "result": { "action": "like", "noteId": "xxx" },
    "durationMs": 2500
  }
]

示例 ​

点赞 ​

xhs_like_feed({
  noteId: "abc123",
  xsecToken: "token"
})

取消点赞 ​

xhs_like_feed({
  noteId: "abc123",
  xsecToken: "token",
  unlike: true
})

多账号点赞 ​

xhs_like_feed({
  noteId: "abc123",
  xsecToken: "token",
  accounts: ["账号1", "账号2"]
})

Released under the MIT License.