Youtube API V3,搜索,publishedAfter,invalidSearchFilter [英] Youtube API V3, search , publishedAfter, invalidSearchFilter

查看:31
本文介绍了Youtube API V3,搜索,publishedAfter,invalidSearchFilter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想在 youtube 上搜索 X 日期后发布的我自己的视频

I'm just trying to make a search over youtube for my own videos that publisher after X date

但是,当我使用 publishAfter 参数时,即使我将 type 参数设置为 video,它也会给出 invalidSearchFilter 错误.

However when i use publishAfter parameter, it's giving invalidSearchFilter error even of i set type parameter as video.

错误描述如下:

该请求包含无效的搜索过滤器和/或限制组合.请注意,如果将 forContentOwnerforMine 参数设置为 ,则必须将 type 参数设置为 video>真实.如果您为 eventTypevideoCaption 设置了值,还必须将 type 参数设置为 video>videoCategoryIdvideoDefinitionvideoDimensionvideoDurationvideoEmbeddablevideoLicensevideoSyndicatedvideoType 参数.

The request contains an invalid combination of search filters and/or restrictions. Note that you must set the type parameter to video if you set either the forContentOwner or forMine parameters to true. You must also set the type parameter to video if you set a value for the eventType, videoCaption, videoCategoryId, videoDefinition, videoDimension, videoDuration, videoEmbeddable, videoLicense, videoSyndicated, or videoType parameters.

您可以从以下位置重现此错误:https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.search.list?part=snippet&forMine=true&publishedAfter=1970-01-01T00%253A00%253A00Z&type=video&_h=11&(通过oauth 2.0登录后)

You can reproduce this error from: https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.search.list?part=snippet&forMine=true&publishedAfter=1970-01-01T00%253A00%253A00Z&type=video&_h=11& (after login via oauth 2.0)

知道在这种情况下我能做什么吗?

Any idea what can i do in this situation?

推荐答案

我使用了您提供的链接.问题不在于日期.问题是您使用的搜索限制冲突.为了使您的搜索工作,请将forMine"参数留空,这样它就不会与您的日期过滤器以及可能的q"参数发生冲突.这样做,它就会起作用.

I used the link that you provided. The problem is not the date. The problem is the conflicting search restrictions that you used. To make your search work, leave the "forMine" parameter empty so it doesn't conflict with your date filters and possibly the 'q' parameter as well. Do that and it will work.

此外,您必须指定 channelID 以指定它是您的.试试看

Also, you have to specify the channelID to specify it's yours. Give it a try

这篇关于Youtube API V3,搜索,publishedAfter,invalidSearchFilter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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