api - 为什么youtube观看次数属性未提供在youtube网站中可见的最新观看次数?

标签 api youtube

我正在从从url获得的Youtube XML数据中获取youtube观看次数:https://gdata.youtube.com/feeds/api/videos/VIDEOID?v=2

但是我在xml数据中观察到关于viewcount属性的两件事:

  • 上传视频后,不会立即创建viewcount属性。 viewcount属性需要1到2天才能显示在XML中。
  • 一旦出现viewcount属性,如果我多次观看视频(例如4),并检查观看次数,则在YouTube网站(移动版和台式机版本)中为4,但在XML数据
  • 中小于4(例如1)

    这对我来说是一个问题,因为我必须在我的应用程序中显示viewcount(与Youtube站点相同)。还有其他方法可以获取最新的YouTube视频观看次数吗?

    请提出建议。

    最佳答案

    API文档中指出,在下,统计数据可能会有所延迟数据更新的预期等待时间 http://code.google.com/apis/youtube/2.0/reference.html#Overview:

    Statistics, such as the number of times a video has been viewed or the number of comments available for a video, are typically updated within 30 minutes to two hours after the upload completes. However, this delay may be longer under heavy API server loads.

    On an ongoing basis, statistics for a video are typically updated every 30 minutes to two hours. However, updates may occur less frequently under heavy server loads or for videos that are viewed very infrequently. In search feeds, updates to ratings and view counts could take as long as a couple of weeks for infrequently viewed videos.

    关于api - 为什么youtube观看次数属性未提供在youtube网站中可见的最新观看次数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8165608/

    相关文章:

    ASP.NET Youtube channel 正则表达式

    api - 我可以在 youtube 上上传视频并将其限制为只能在我的网站上观看吗?

    web-services - 为什么有些 API 提供者需要 API key ?

    node.js - 使用 node.js 和 Glob 将多个文件从 Google Cloud 虚拟机上传到 Google Cloud Storage

    iframe - 如何解决youtube-2的youtube嵌入视频的受限内容?

    android - 如何在 WebView 中全屏显示 youtube 视频

    java - Telegram 最新层

    jquery - 为什么 jQuery 的回调参数不一致?

    python - 如何从 id 中抓取 youtube 视频的缩略图?

    javascript - 从 YOUTUBE URL 获取视频 ID,然后将其插入文本区域