Skip to content

commentHistory ​

当前登录账号的历史评论。上游 myCmt 按登录账号返回,与 uid 无关。

方法返回分页访客
listMine(options?)CommentHistoryPageResultmaxId / page不可用
streamMine(options?)ITweetComment 流maxId不可用

访客调用抛 AUTH_SESSION_EXPIRED(context.requiredAuth = 'cookie')。详见 访客限制。

listMine(options?) ​

选项类型说明
maxIdnumber | string上一页的 cursor;数字字符串转 number,优先于 page
pagenumber页码,未给 maxId 时生效

返回:

ts
interface CommentHistoryPageResult {
  cursor: number              // next_cursor;0 表示到底
  hasMore: boolean
  total?: number
  comments: ITweetComment[]   // 已按评论 id 去重
}

streamMine(options?) ​

ts
for await (const comment of sdk.commentHistory.streamMine({
  maxPages: 3,
  since: '2026-01-01',
})) {
  console.log(comment.id, comment.text, comment.parentMblogId)
}

选项:maxId、page、maxPages、maxItems、since、until、onProgress。

停止条件:next_cursor === 0、空页、游标不前进、整页重复、日期边界、上限。

错误与边界 ​

  • 归档其他 uid 时,includeCommentHistory 抛 CONFIG_INVALID。
  • 返回的评论里 parentMblogId 指向被评论微博,前提是上游内嵌了 status。

CLI ​

bash
weibo-cli comment mine
weibo-cli comment stream --max-pages 3

只读公开数据;请遵守微博服务条款与隐私边界。