使用Youtube Data API将视频上传到youtube时达到的每日限制

编程入门 行业动态 更新时间:2024-10-26 21:33:25
本文介绍了使用Youtube Data API将视频上传到youtube时达到的每日限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我目前正在尝试使用youtube api构建项目.做测试时,我看到一个错误

I'm currently trying to build a project using the youtube api. When doing tests, I had an error which says

"The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>"

我查看了Google云控制台,并看到了以下内容:

I looked at the google cloud console and saw these:

第一个屏幕截图显示我提出了38 + 13个请求,因此我真的应该还没有达到每日限制.

The first screenshot shows I made 38 + 13 requests so I really should have not reached the daily limit yet.

这是一个错误还是我不了解配额限制的工作原理?

Is this a bug or is it me who didn't understand how the quota limit works?

推荐答案

实际上,您正在显示的这些页面可能会造成混淆.

Indeed these pages you're showing maybe confusing.

但是您必须承认,YouTube的Data API配额系统没有考虑一个查询的数量.相反,API将 quota cost ,并因此计算了一个端点正在生成的所有端点调用的配额成本之和.

But you have to acknowledge that YouTube's Data API quota system is not accounting for the number of queries one is making. Instead, the API attaches to each kind of its endpoint a quota cost, and, thus, is accounting for the sum of quota cost of all endpoint calls one is making.

还值得注意的是,配额系统会将每个失败的端点调用(无论发生什么原因)都视为已完成的调用.

Also worth of noticing is that each failed endpoint call (for whatever reason that happened) gets accounted by the quota system as a completed call.

此外,任何给定的 Videos.insert API端点调用的配额成本为1600个单位(非常昂贵);分别指定任何 Channels.list API端点调用的配额成本为1个单位(非常便宜).

Furthermore, any given Videos.insert API endpoint call has a quota cost of 1600 units (very expensive); respectively, any given Channels.list API endpoint call has a quota cost of 1 unit (very cheap).

因此,通过基本算术,您可以验证您的API活动确实超出了分配的每日配额.

Consequently, by way of elementary arithmetic, you may verify that indeed you exceeded with your API activity the daily quota allocated.

更多推荐

使用Youtube Data API将视频上传到youtube时达到的每日限制

本文发布于:2023-11-17 07:41:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1609333.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:视频   Data   Youtube   youtube   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!