YouTube的API - 通过查询日期公布 [英] YouTube API - Querying by publish date

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

问题描述

我在写一个使用YouTube code API来执行特定类型的搜索web应用程序。在这种情况下,我试图寻找与查询匹配的所有视频,并进行了两个日期之间的上传。 <一href=\"http://$c$c.google.com/apis/youtube/2.0/developers_guide_protocol.html#Displaying_a_list_of_videos\">This文件说,我可以用发表-min和出版-MAX参数,而这个说,我可以使用更新分钟和更新-MAX。

I'm writing a webapp that uses the YouTube Code API to do specific types of searches. In this case, I'm trying to search for all videos that match a query, and which were uploaded between two dates. This document says I can use published-min and published-max parameters, while this one says I can use updated-min and updated-max.

这两个参数集导致Yo​​uTube将返回一个错误:

Both of these parameter sets cause YouTube to return an error:

  • published-min returns "This service does not support the 'published-min parameter"
  • updated-min returns "This service does not support the 'updated-max' parameter"
  • With neither returns a correct result set.

如何限制我的结果的指定日期范围内设置命中?

How can I limit my result set to hits within a specified date range?

推荐答案

借助参考指南YouTube的数据API 没有列出任何建议的可能性对一般的时间间隔进行筛选。

The Reference Guide for YouTube's Data API doesn't list anything that would suggest the possibility to filter on time interval in general.

公布分钟参数在<仅做广告href=\"http://$c$c.google.com/apis/youtube/2.0/developers_guide_protocol.html#User_activity_feeds\">\"User活动源一节这是不同的东西,可能不是你想要的东西,或者是什么呢?

The published-min argument is only advertised in the "User activity feeds" section which is something different and probably not the thing you wanted. Or is it?

在你的链接的更新分钟参数在通用GDATA上下文引用。它看起来像他们打算所有常见的事情来描述所有专门的API,但不知何故更新分钟不是随处可见。

The updated-min argument in your link is referenced in a generic gdata context. It looks like they intended to describe all the things common to all the specialized APIs, but somehow updated-min isn't available everywhere.

当谈到你非常的问题。我建议在时间排序(排序依据公布= ),并做客户端的过滤。我知道这是不是最佳方法,但唯一一个我可以用什么谷歌给我们看看。

When it comes to your very problem. I would suggest sorting on time (orderby=published) and do the filtering on the client side. I know this is not the optimal way, but the only one I can see with what Google gives us.

这篇关于YouTube的API - 通过查询日期公布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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