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

查看:27
本文介绍了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.

推荐答案

更新:问题似乎已被谷歌修复,并且可以正常工作.

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 解决我们的问题 n,但它仍然无法正常工作.

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天全站免登陆