Youtube Data API:搜索视频,按syndicate = true过滤

时间:2013-09-28 10:20:14

标签: api youtube

我正在尝试在youtube数据api上搜索“联合”属性设置为“允许”的视频(因此应该允许它们在移动设备上播放)。

我试过这样:

https://gdata.youtube.com/feeds/api/videos?q=music&v=2&prettyprint=true&fields=entry[yt:accessControl/@action='syndicate'](id,title,yt:accessControl)

返回Feed如下所示:

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:yt='http://gdata.youtube.com/schemas/2007'>
<entry>
    <id>tag:youtube.com,2008:video:XXXXXXX</id>
    <title>XXXXXXX</title>
    <yt:accessControl action='comment' permission='allowed'/>
    <yt:accessControl action='commentVote' permission='allowed'/>
    <yt:accessControl action='videoRespond' permission='moderated'/>
    <yt:accessControl action='rate' permission='allowed'/>
    <yt:accessControl action='embed' permission='allowed'/>
    <yt:accessControl action='list' permission='allowed'/>
    <yt:accessControl action='autoPlay' permission='allowed'/>
    <yt:accessControl action='syndicate' permission='denied'/>
</entry>

这很好,但是现在我还需要整合“permission ='allowed'”条件。我已经尝试了很多不同的组合(参见https://developers.google.com/youtube/2.0/developers_guide_protocol_partial?hl=de#Fields_Formatting_Rules),但无法使其正常工作。任何提示?