Today, on YouTube's revision history page it is stated that
The channel resource's contentDetails.relatedPlaylists.watchHistory and contentDetails.relatedPlaylists.watchLater properties are only visible to an authorized user retrieving data about the user's own channel. After September 12, 2016, the contentDetails.relatedPlaylists.watchHistory will return a value of HL and the contentDetails.relatedPlaylists.watchLater property will return a value of WL for all channels.
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.
I have an (ok-working) extension thats only feature right now is to show the total length of time of a YouTube playlist. Right now you have to refresh the page (any page with a playlist on it) in order for the length to show up. I use playlists.list
and playlistItems.list
to get length details of each video in the playlist, you can view the source here. (Btw, you should totally comment on my code quality, I like feedback) As you can see from the revision, this extension won't work after September 12th for watch later playlists.
Anyways, the most useful case of my extension is to see how long it would take to get through your watch later playlist. Currently I know that it would take me 4 Days 17 Hours 7 Minutes and 10 Seconds to watch all 365 videos on my watch later playlist. After September 12th, I will not be able to know this information.
How am I supposed to get this information about my watch later playlist then? Which resource do I hit up? Is the next reasonable course of action to get hired by YouTube to work on their backend just to add the total length of time to watch a playlist into playlist.list
?
This data will not be available via the YouTube API service after September 15, 2016.
The changelog confirms that the watch history and watch later playlists return empty lists. Unfortunately, no alternative is mentioned.
September 15, 2016.
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.
来源:https://stackoverflow.com/questions/38908308/how-to-get-watch-later-playlist-details-after-september-12th