gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 05:44:03 26 4
gpt4 key购买 nike

我正在从从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/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com