评价由其他用户使用 YouTube api 撰写的评论?

Rate comment, that was written by other user using YouTube api?

def update_comment(youtube, comment):
  comment['snippet']['viewerRating'] = 'like'
  comment['snippet']['textOriginal'] = 'some text' # Note this is important parameter
  update_result = youtube.comments().update(
    part='snippet',
    body=comment
  ).execute()

此代码仅更新评论和评分,如果此评论是我的。

但是,如果我想评价另一条评论,就会发生 Http 错误 400。

所以,able/possible 评价其他用户写的评论。

好吧,根据 this 之类的其他 SO 问题,只能在您自己的评论中对评论进行评分,而不能对其他用户进行评分。

如果你也查看Comments and CommentThreads的文档,这里没有办法实现你喜欢的。

我建议您经常查看 YouTube API 的 Revision History 以了解您可以使用它执行的最新功能。

有关更多信息,请同时查看此