youtube api 播放列表项已删除的视频 [英] youtube api playlistitems deleted videos

查看:18
本文介绍了youtube api 播放列表项已删除的视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到通过 Youtube API v3 检索到的数据与 Youtube 显示的直接访问网站的数据之间存在一些不一致.有时,通过播放列表项目列表返回的数据包含的项目(视频)数量少于网站中显示的播放列表.当播放列表包含已删除的视频时会发生这种情况.事实上,有时在youtube的播放列表中标记为已删除的视频,在playlistitems调用的返回数据中仍然会报告,有时则不会,导致播放列表有2种不同的大小(即网站上的20个视频和只有 18 个通过 api 返回).

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).

当我的用户比较 youtube 和我的应用程序中的播放列表时,这让他们感到困惑,因为他们看到了 2 个不同的结果......

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?

如果相关,我正在使用 php 和 youtube v3 apis 以及 youtube 的 php 库.

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

推荐答案

我认为这是 YouTube API 版本 3 中的一个错误.您应该检查它是否已经被报告为错误,如果没有,您可以在这里自己提交:https://code.google.com/p/gdata-issues/issues/list?q=label:API-YouTube

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

如果您决定将其作为错误提交,则应提及显示问题的播放列表 ID.

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

我也注意到了.不过,这并不困扰我.就我而言:使用 API 版本 3.响应缺少一项或多项.缺少的播放列表项在 youtube.com 上始终显示为已删除它发生在某些播放列表中,但不是全部.播放列表是公开的,仅包含来自其他频道的视频.

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.

这篇关于youtube api 播放列表项已删除的视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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