Youtube Data API 搜索:列表返回不真实的结果?
例如,
//php code
$client = new Google_Client();
$client->setDeveloperKey($DEVELOPER_KEY);
$youtube = new Google_Service_YouTube($client);
$searchResponse = $youtube->search->listSearch('id', array(
'part' => "snippet",
'type' => "channel",
'maxResults' => "50",
'order' => "viewCount",
'publishedAfter' => "2021-10-25T00:00:00Z",
'publishedBefore' => "2021-10-25T23:59:59Z",
'regionCode' => "JP",
));
此查询仅返回 9 个频道(并且多个频道的 RegionCode 不是 JP)。 此过滤器下应该有超过 9 个通道,因为 UCUJNWCiqMT_UudVRSSGZ3SA
等通道 id 满足所有条件(由 Channels API 返回的信息证明),但未包含在这 9 个通道中。 我尝试添加条件 'safeSearch' => “none”,
但它也不起作用。
这只是一个例子,表明 Youtube Data API Search: list 似乎只返回一小部分数据(至少在频道的情况下),这是不现实的。
是我的代码错误还是这个 API 只提供不完整的结果? 我怎样才能得到可靠的结果?
此致
For instance,
//php code
$client = new Google_Client();
$client->setDeveloperKey($DEVELOPER_KEY);
$youtube = new Google_Service_YouTube($client);
$searchResponse = $youtube->search->listSearch('id', array(
'part' => "snippet",
'type' => "channel",
'maxResults' => "50",
'order' => "viewCount",
'publishedAfter' => "2021-10-25T00:00:00Z",
'publishedBefore' => "2021-10-25T23:59:59Z",
'regionCode' => "JP",
));
This query return only 9 channels (and the regionCode of several channels are not JP).
There should be more than 9 channels under this filter because channel id such as UCUJNWCiqMT_UudVRSSGZ3SA
satisfy all conditions (proved by the information return by Channels API) but was not contained in those 9 channels.
I have tried to add condition 'safeSearch' => "none",
but it doesn't work either.
This is just an example to show that Youtube Data API Search: list seems only return a small piece of data (at least in the case of channels) which were unrealiable.
Was my code wrong or this API does only provide incomplete results?
How could I get realiable results?
Best regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论