问题描述
是否可以使用 YouTube api 获取用户稍后观看播放列表的链接?我正在尝试生成一个 url 以从第一个视频开始播放稍后观看播放列表,以便最终链接类似于 youtube.com/watch?v=videoID&list=playlist.我使用的是 YouTube 数据 API v3.
Is it possible to get the link for a users watch later playlist using the YouTube api? I'm trying to generate a url to start playing the watch later playlist from the first video, so that the final link would be something like youtube.com/watch?v=videoID&list=playlist. I'm using the YouTube Data API v3.
推荐答案
不幸的是,从本月开始,Google 似乎已弃用通过公共 API 访问稍后观看"播放列表:
Unfortunately, it looks like as of this month Google has deprecated access to the Watch Later playlist via the public API:
频道资源的 contentDetails.relatedPlaylists.watchHistory和 contentDetails.relatedPlaylists.watchLater 属性现在包含分别为所有通道的 HL 和 WL 值.(属性仅对检索有关该数据的授权用户可见用户自己的频道.)
此外,请求检索播放列表详细信息 (playlists.list) 或频道观看历史记录的播放列表项 (playlistItems.list) 或稍后观看播放列表现在返回空列表.这种行为适用于新值,HL 和 WL,以及任何观看历史或观看您的 API 客户端可能已存储的后续播放列表 ID.
In addition, requests to retrieve playlist details (playlists.list) or playlist items (playlistItems.list) for a channel's watch history or watch later playlist now return empty lists. This behavior 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.
有关详细信息,请参阅完整的修订历史记录.
See the full revision history for more information.
这篇关于通过 YouTube API 稍后观看播放列表网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!