Youtube Data API v3 PlaylistItems 更新不适用于稍后观看播放列表 [英] Youtube Data API v3 PlaylistItems update not working for Watch Later playlists

查看:18
本文介绍了Youtube Data API v3 PlaylistItems 更新不适用于稍后观看播放列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,youtube.playlistItems.list 在列出 watchLater 播放列表时未获取适合 youtube.playlistItems.update 的播放列表项.它非常适用于不在频道的relatedPlaylists 类别下的播放列表.(例如历史、收藏、喜欢等)

Recently, the youtube.playlistItems.list doesn't fetch a playlist item that is suitable for the youtube.playlistItems.update when listing the watchLater playlist. Its works perfectly for playlist that aren't under the relatedPlaylists category of a channel. (e.g. History, favourite, likes etc.)

我的列表响应如下所示:

My list response looks like this:

{
 "items": [
  {
   "id": "V0xWWlh5N2JrM0JSTjAtcDJVUmdjc3JRLjZCM0UwMDFFNUU3NzYzNjc=",
   "snippet": {
    "publishedAt": "2016-03-21T19:04:22.000Z",
    "title": "One Word - Episode 38: Skin Tone (Black Women)",
    .
    .
    .
    "channelTitle": "Ryan Carter",
    "playlistId": "WLVZXy7bk3BRN0-p2URgcsrQ",
    "position": 0,
    "resourceId": {
     "kind": "youtube#video",
     "videoId": "0gYgzN6B0y4"
    }
   }
  },

但是当我使用这些值时:

But when I use those values:

PUT https://www.googleapis.com/youtube/v3/playlistItems?part=snippet%2Cid&key={YOUR_API_KEY}

{
 "id": "V0xWWlh5N2JrM0JSTjAtcDJVUmdjc3JRLjZCM0UwMDFFNUU3NzYzNjc=",
 "snippet": {
  "playlistId": "WLVZXy7bk3BRN0-p2URgcsrQ",
  "resourceId": {
   "kind": "youtube#video",
   "videoId": "0gYgzN6B0y4"
  }
 }
}

我明白了:

404 null

- Show headers -

{
 "error": {
  "errors": [
   {
    "domain": "youtube.playlistItem",
    "reason": "playlistItemNotFound",
    "message": "Playlist item not found."
   }
  ],
  "code": 404,
  "message": "Playlist item not found."
 }

}

  • 只为我打倒?
  • Google 是否阻止了稍后观看"播放列表的更新?
  • 服务有问题吗?

推荐答案

看起来错误"只是过渡期的一部分,YouTube 计划取消通过 API 获取稍后观看"和观看历史记录"播放列表的功能.正如 Tym 评论的,错误"在这里/被跟踪:https://code.google.com/p/gdata-issues/issues/detail?id=8145 .

Looks like the "bug" was just part of the transition period where YouTube planned to remove the ability to fetch the Watch Later and Watch History playlist through there API. As Tym commented the "bug" is/was tracked here: https://code.google.com/p/gdata-issues/issues/detail?id=8145 .

TLDR:

在 2016 年 9 月 12 日之后,检索频道观看历史或稍后观看播放列表的播放列表详细信息 (playlists.list) 的请求将返回一个空列表.检索这些播放列表中的任何一个中的播放列表项 (playlistItems.list) 的请求将在该时间之后还会返回一个空列表.对于新值 HL 和 WL 以及您的 API 客户端可能已存储的任何观看历史记录或稍后观看播放列表 ID 都是如此."

"Requests to retrieve playlist details (playlists.list) for a channel's watch history or watch later playlist will return an empty list after September 12, 2016. Requests to retrieve playlist items (playlistItems.list) in either of those playlists will also return an empty list after that time. This is true for the new values, HL and WL, as well as for any watch history or watch later playlist IDs that your API Client may have already stored."

https://developers.google.com/youtube/v3/revision_history#september-15-2016

这篇关于Youtube Data API v3 PlaylistItems 更新不适用于稍后观看播放列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆