Watch Later playlist url via YouTube API

↘锁芯ラ 提交于 2019-12-23 09:57:04

问题


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.


回答1:


Unfortunately, it looks like as of this month Google has deprecated access to the Watch Later playlist via the public API:

The channel resource's contentDetails.relatedPlaylists.watchHistory and contentDetails.relatedPlaylists.watchLater properties now contain values of HL and WL, respectively, for all channels. (The properties are only visible to an authorized user retrieving data about the user's own channel.)

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.




回答2:


You should do a channels->list with mine = true.

Then from the channel response, you will get the watchlater-playlistID.



来源:https://stackoverflow.com/questions/21975200/watch-later-playlist-url-via-youtube-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!