检查重复的 Youtube API 上传 [英] Check Duplicate Youtube API Upload

查看:43
本文介绍了检查重复的 Youtube API 上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以检查重复的 YouTube 上传?

Is it possible to check for duplicate youtube upload?

当我尝试上传同一视频时,它位于 youtube 的被拒绝部分,状态显示为重复".

When I try to upload the same video it is in the rejected section of youtube and shows the status as 'duplicate'.

是否可以像 youtube 一样在客户端本身检查重复的视频上传?

Is it possible to check duplicate video upload in the client side itself as youtube is doing?

推荐答案

如果您在获得视频所有者授权的情况下请求检索视频条目,您可以获取有关该视频的信息,包括是否被拒绝以及拒绝的原因.(被拒绝的视频不会在未经授权的 API 响应中返回.)

If you make a request to retrieve the video entry while authorized as the owner of the video, you can get information back about that video, including whether it was rejected and the cause for rejection. (Rejected videos are not returned in unauthorized API responses.)

有一个文档部分描述了如何检查此类事情.对于因重复而被拒绝的视频,您将收到 <yt:响应中的 state> 元素大致类似于

There's a section of the documentation that describes how to check for this sort of thing. For a video that's rejected as a duplication, you'll get back a <yt:state> element in the response that looks approximately like

<yt:state name="rejected" reasonCode="duplicate" ...>...</yt:state>

作为上传响应的一部分,无法确定视频是否重复,因为 YouTube 在处理视频之前不知道该视频是否重复,并且处理发生在上传完成后完成.

There's no way to determine whether a video is a duplicate or not as part of the upload response, because YouTube doesn't know whether the video is a duplicate until it has processed the video, and processing takes place after the upload has completed.

这篇关于检查重复的 Youtube API 上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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