我正在从从url获得的Youtube XML数据中获取youtube观看次数:https://gdata.youtube.com/feeds/api/videos/VIDEOID?v=2
但是我在xml数据中观察到关于viewcount属性的两件事:
这对我来说是一个问题,因为我必须在我的应用程序中显示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/