YouTube API v3 批处理 [英] YouTube API v3 batch processing

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

问题描述

YouTube API v3 是否支持批处理?我已经使用普通的单个请求编写了我的代码,但它需要永远执行,因为它大约有 40000 个请求.

does YouTube API v3 support batch processing? I've wrote my code using normal individual requests, but it takes forever to execute since it's about 40000 requests .

推荐答案

是的,在 v3 中支持批处理,但在 v2 中不支持.

Yes, batch processing is supported in v3 but not like in v2.

https://developers.google.com/youtube/v3/指南/实施/弃用#Batch_Processing

v3 API 支持 v2 API 支持的批处理用例之一.v3 API 的 channels.list、channelSections.list、guideCategories.list、playlistItems.list、playlists.list、subscriptions.list、videoCategories.list 和 videos.list 方法都支持 id 参数,可用于指定以逗号分隔的 ID 列表(视频 ID、频道 ID 等).使用这些方法,您可以检索多个资源的列表一个请求."

"The v3 API supports one of the batch processing use cases that the v2 API had supported. The v3 API's channels.list, channelSections.list, guideCategories.list, playlistItems.list, playlists.list, subscriptions.list, videoCategories.list, and videos.list methods all support an id parameter, which can be used to specify a comma-delimited list of IDs (video IDs, channel IDs, etc.). Using those methods, you can retrieve a list of multiple resources with a single request."

这篇关于YouTube API v3 批处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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