0
我想为Youtube JS API的搜索查询添加排序,但我无法使其工作。Youtube JS API cuePlaylist Filtering
这是使用浏览器
https://www.youtube.com/results?search_query=test
这是做同样的搜索脚本的一部分,但在使用播放器
player.cuePlaylist({listType:'search', list:'test'});
测试了一个标准的搜索和它完美的作品。但是,当我想向搜索查询添加排序时。它不起作用。
例如,使用额外的过滤器“Today”搜索测试。 IT不起作用(播放列表是空阵列)。
浏览器搜索
https://www.youtube.com/results?sp=CAESAggC&q=test
然而,这
player.cuePlaylist({listType:'search', list:'sp=CAESAggC&q=test'});
不会产生结果。所述documentation状态:
If the listType property value is search, then the list property specifies the search query.
我试图与&一个量m P替换&;(没有空格),但仍没有骰子。
我也找不到与文档中的过滤相关的任何内容。
基本上问题是如何对cuePlaylist方法应用过滤。
编辑:
尝试这样:
player.cuePlaylist({listType:'search', list:'test', sp:'CAESAggC'});
的SP什么也没做
非常感谢,你需要添加订单,它会工作。例如,先上传最新上传的视频,然后订购:“日期”。视频排序不需要(无论如何)。此外,由于视频中包含字符串,因此视频中的id不能确定您的意思是favoriteCount。 –