我正在尝试在 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)
返回提要如下所示:
<?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),但无法使其正常工作。有什么提示吗?