api - 从频道 ID 获取广播 ID - youtube api v3
问题描述
我需要根据视频 URL 知道实时聊天的 ID(或广播,以便我可以获取实时聊天的 ID)(我已经有了基于视频 URL 的频道 ID)。我尝试按照此处解释的 API 端点进行操作。
这是我输入到 URL 地址的内容/我使用 GET 请求的内容:
这就是输出:
{
"kind": "youtube#searchListResponse",
"etag": "HThuNpak09_KEjLGVv8ha1kgI3A",
"regionCode": "PL",
"pageInfo": {
"totalResults": 2,
"resultsPerPage": 5
},
"items": [
{
"kind": "youtube#searchResult",
"etag": "ui0jIAKvsHNSKCOhqlbrgXGcH4o",
"id": {
"kind": "youtube#video",
"videoId": "36YnV9STBqc"
},
"snippet": {
"publishedAt": "2020-03-28T00:19:07Z",
"channelId": "UChs0pSaEoNLV4mevBFGaoKA",
"title": "The Good Life Radio • 24/7 Live Radio | Best Relax House, Chillout, Study, Running, Gym, Happy Music",
"description": "The Good Life is live streaming the best of Relaxing & Chill House Music, Deep House, Tropical House, EDM, Dance & Pop as well as Music for Sleep, Focus, ...",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/36YnV9STBqc/default_live.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/36YnV9STBqc/mqdefault_live.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/36YnV9STBqc/hqdefault_live.jpg",
"width": 480,
"height": 360
}
},
"channelTitle": "The Good Life Radio x Sensual Musique",
"liveBroadcastContent": "live",
"publishTime": "2020-03-28T00:19:07Z"
}
},
{
"kind": "youtube#searchResult",
"etag": "kRiJkYyDYEITPVKTY4ZwhzM2LeE",
"id": {
"kind": "youtube#video",
"videoId": "wKOEl_vwPSo"
},
"snippet": {
"publishedAt": "2020-04-29T15:57:15Z",
"channelId": "UChs0pSaEoNLV4mevBFGaoKA",
"title": "Deep House Radio • 24/7 Live Radio | Vocal Deep House & Chill House Music",
"description": "Deep House Radio • 24/7 Live Radio | Vocal Deep House & Chill House Music Listen to the Playlist on Spotify: ...",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/wKOEl_vwPSo/default_live.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/wKOEl_vwPSo/mqdefault_live.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/wKOEl_vwPSo/hqdefault_live.jpg",
"width": 480,
"height": 360
}
},
"channelTitle": "The Good Life Radio x Sensual Musique",
"liveBroadcastContent": "live",
"publishTime": "2020-04-29T15:57:15Z"
}
}
]
}
做,我在这里找不到广播 id 或聊天 id。你们知道某种解决方法,或者解决这个问题吗?您知道自从我链接的答案发布后发生了什么变化吗?
解决方案
推荐阅读
- pointers - 在函数中声明共享指针会产生内存泄漏行为
- anylogic - 复制 e 以正确的顺序粘贴多个矩形节点
- r - 按组查找时间间隔中的重叠并返回子集 data.frame
- android-studio - Android Studio 不会抓取 svg 图片
- ruby-on-rails - 提交表单时没有任何反应
- windows - 使用自签名证书对内核驱动程序 (.sys) 进行签名以在不禁用 Windows 上的签名强制的情况下加载
- typescript - 使用 ConstructorParameters 扩展泛型类?
- node.js - 使用 passport-jwt 进行 JWT 身份验证不考虑到期日期
- python - 刚刚更新到 VSCode 1.58.2,不能再调试以前工作的 python 代码
- javascript - 如何使用 javascript 从 Firebase rt-db 过滤数据