YouTube 数据 API 不再从 search.list 返回活动的直播流 [英] YouTube Data API no longer returns active live streams from search.list

查看:17
本文介绍了YouTube 数据 API 不再从 search.list 返回活动的直播流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个使用 YouTube Data API V3 的 search.list,它能够使用以下内容为指定频道(自 2018 年开始工作)提取活动直播流:

I wrote an application that uses YouTube Data API V3's search.list, which was able to pull active live streams for a specified channel (working since 2018) using the following:

https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCSJ4gkVC6NrvII8umztf0Ow&type=video&eventType=live&key={MYAPIKEY}

截至 2019 年 9 月 12 日,以上不再为我返回任何结果.

The above no longer returns any results for me as of September 12, 2019.

将搜索范围扩大到指定频道的所有视频也不再显示活动直播:

Broadening the search to all videos for a specified channel also no longer shows the active live stream:

https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCSJ4gkVC6NrvII8umztf0Ow&order=date&key={MYAPIKEY}

但是,搜索活动直播流的 ID 本身可以返回有关视频的信息,这让我相信仍有可能实现此目的:

However, searching the ID of the active live stream itself works to return information about the video, which leads me to believe there may still be a way to accomplish this:

https://www.googleapis.com/youtube/v3/videos?part=snippet&id=hHW1oY26kxQ&key=

我正在寻找一种新的解决方案,该解决方案能够查询频道以查看他们是否有正在运行的活动直播,并获取该直播的属性.

I am looking for a new solution that would be able to query a channel to see if they have an active live stream running, and grab the properties for that live stream.

推荐答案

更新:问题似乎已由 Google 修复,并且正常运行.

Update: It seems the problem is fixed by Google, and it works as normal.

我遇到了同样的问题,搜索 API eventType=live 不再提供任何结果,并且在没有 eventType 的情况下对其进行编码会显示所有视频,包括实时视频,但无法对其进行排序,因为 livebroadcastcontent 表示没有,即使它是实时的一.我希望这是暂时的失败.将 channelId 更改为 channelId 不起作用.

I got the same problem, the search API eventType=live gives no results anymore and coding it without eventType shows all videos including the live ones, but there's no way to sort it out because livebroadcastcontent says none even if it is a live one. I hope it's a temporary failure. Changing channelId to channelId doesn't do the thing.

我得到了如下临时解决方案.删除 channelId 并使用关键字代替 q=... 这将返回实时广播.这不是最好或最方便的解决方案,但它对我有所帮助.我认为 YouTube 必须使用 eventType-live 来解决我们的问题,但它仍然无法正常工作.

I got a temporary solution as follows. Remove channelId and use a keyword instead q=... this returns a live broadcast. It's not the best or most handy solution, but it helped me a bit. I think YouTube has to solve our problem n with eventType-live for a channelId it still doesn't work.

这篇关于YouTube 数据 API 不再从 search.list 返回活动的直播流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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