commentthreads.list()带有channelID或allthreadsrecredtoChannelid作为参数给出http 403错误

发布于 2025-01-23 04:19:43 字数 966 浏览 2 评论 0 原文

我正在尝试获取特定频道的所有视频评论。而且我会遇到以下错误。

{
  "error": {
    "code": 403,
    "message": "The video identified by the \u003ccode\u003e\u003ca href=\"/youtube/v3/docs/commentThreads/list#videoId\"\u003evideoId\u003c/a\u003e\u003c/code\u003e parameter has disabled comments.",
    "errors": [
      {
        "message": "The video identified by the \u003ccode\u003e\u003ca href=\"/youtube/v3/docs/commentThreads/list#videoId\"\u003evideoId\u003c/a\u003e\u003c/code\u003e parameter has disabled comments.",
        "domain": "youtube.commentThread",
        "reason": "commentsDisabled",
        "location": "videoId",
        "locationType": "parameter"
      }
    ]
  }
}

注意: - 我尝试获取其他渠道的视频评论,并且响应上以上没有问题。

请阐明这一点,并在可能的情况下提供官方的API文档。

I am trying to get all the video comments of a specific channel https://www.youtube.com/channel/UCRTxkfOMHehmuD2kGcAS2bg. And I am getting the below error.

{
  "error": {
    "code": 403,
    "message": "The video identified by the \u003ccode\u003e\u003ca href=\"/youtube/v3/docs/commentThreads/list#videoId\"\u003evideoId\u003c/a\u003e\u003c/code\u003e parameter has disabled comments.",
    "errors": [
      {
        "message": "The video identified by the \u003ccode\u003e\u003ca href=\"/youtube/v3/docs/commentThreads/list#videoId\"\u003evideoId\u003c/a\u003e\u003c/code\u003e parameter has disabled comments.",
        "domain": "youtube.commentThread",
        "reason": "commentsDisabled",
        "location": "videoId",
        "locationType": "parameter"
      }
    ]
  }
}

Note:- I have tried getting the video comments for the other channels and there is no issue with the response as above.

Please throw some light on this and provide the official api docs if possible.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独留℉清风醉 2025-01-30 04:19:43

似乎有些视频已禁用了这个。相反,您应该使用 commentThreads:list list 每个 face> face> /代码>。

要获取给定的YouTube频道的所有视频ID,您可以通过使用上载 playlist ID “ rel =“ nofollow noreferrer”> channels:list 使用 contentDetails for part ,然后提供此 uploads playlist ID到 playListItems:list 获取频道的视频ID。

It seems that some videos have disabled comments like this one. You should instead use CommentThreads: list with each videoId.

To get all video ids of a given YouTube channel you can get the uploads playlist id by using Channels: list with contentDetails for part and then provide this uploads playlist id to PlaylistItems: list to get the channel's video ids.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文