本文介绍了youtube 提要的预期延迟?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们从以前开发的内部视频系统切换到 YouTube,现在我已将其用于用户的公共上传供稿.当我们第一次从主要用户的帐户中获得大约 150 个视频中的大约 12 个时,问题就出现了.随着一天中的时间,这个数字上升到大约 50,并保持在那里.我在 YouTube API 论坛上找到了一篇关于延迟的帖子,但没有说明我可以期待多长时间.

We switched over to YouTube from a previously developed internal video system, and right now I've got it going on public upload feeds for users. The problem comes when we first got only about a dozen out of 150 or so videos available from the primary user's account. Over time of the day that number rose to about 50, and its stayed there. I found one post on the YouTube API forums about delay, but no word on how long I can expect that.

有没有人有这方面的经验告诉我会发生什么?

Anyone have experience about this to tell me what to expect?

推荐答案

预期的延迟可能会有所不同,并记录在此处 (http://code.google.com/apis/youtube/2.0/reference.html) - 最小化它的方法:

Expected latencies can vary, and are documented here (http://code.google.com/apis/youtube/2.0/reference.html) - ways you can minimize it:

1) 将视频上传为公开.如果您先将视频上传为私人视频,这将使视频无法进入快速索引

1) Upload the video as public. If you upload the video as private first, this will leave the video out of the fast-track indexing

2) 向用户提要发出经过身份验证的请求,这将保证 API 拥有的最新数据.IE.http://gdata.youtube.com/api/feeds/users/username/上传(使用用户名"的开发密钥和身份验证令牌)而不是 http://gdata.youtube.com/api/feeds/videos?author=username

2) Make an authenticated request to the user feed, this will guarantee the freshest data that the API has.ie. http://gdata.youtube.com/api/feeds/users/username/uploads (with a dev key and auth token for 'username') instead of http://gdata.youtube.com/api/feeds/videos?author=username

这篇关于youtube 提要的预期延迟?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 17:53