youtube api playlistitems deleted videos

别等时光非礼了梦想. 提交于 2019-12-02 20:49:21

问题


I noticed some inconsistencies between the data retrieved via the Youtube API v3 and what Youtube shows accessing directly the website. Sometimes, the data returned via the playlistitem list contains a lower number of items (videos) than the playlist shown in the website. This happens when the playlist contains deleted videos. In fact, at times, a video marked as deleted on youtube's playlist, it is still reported in the returned data of a playlistitems call, other times it is not, leading to a playlist having 2 different sizes (i.e. 20 videos on the website and only 18 returned via the api).

This is puzzling for my users when they compare the playlists on youtube and in my application, as they see 2 different results...

Anyone knows how to handle playlists with deleted videos? Or how to retrieve the same data as it is shown in the website?

I'm using php and youtube v3 apis and youtube's php libraries if it is relevant.


回答1:


I think it is a bug in the YouTube API version 3. You should check if it is already reported as a bug and if not you can file it yourself here: https://code.google.com/p/gdata-issues/issues/list?q=label:API-YouTube

if you decide to file it as a bug you should mention a playlistID that shows the problem.

I have noticed it too. However, it does not bother me. In my case: Using API version 3. The response is missing one or more items. Missing playlist items always appear as DELETED on youtube.com It happens on some playlists but not all. The playlist is PUBLIC and contains only videos from other channels.



来源:https://stackoverflow.com/questions/21189885/youtube-api-playlistitems-deleted-videos

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