@3xanax/youtube-stream-status 中文文档教程
youtube-stream-status
检查 YouTube 频道是否直播的节点模块
Installation
Node.js 需要
npm install @3xanax/youtube-stream-status
Usage
需要 YouTube 频道 ID。 例子: <代码>https://www.youtube.com/channel/UCiaoRUmpQ0mH05w9PVQzYPw UCiaoRUmpQ0mH05w9PVQzYPw
是上述 url 中的频道 ID 字符串
const yt = require('@3xanax/youtube-stream-status');
yt.getStream("UCiaoRUmpQ0mH05w9PVQzYPw")
.then(data => {
console.log(data)
})
直播时
{
"stream": {
"_id": "UCiaoRUmpQ0mH05w9PVQzYPw"
}
}
的示例输出: 离线时的示例输出:
{
"stream": null
}
Support & Issues
重要:请帮助我提高效率! 我在空闲时间免费开发。 通过发布完整的、结构化的和有用的问题来为项目做出贡献,我可以快速重现这些问题而无需询问丢失的信息。
LICENSE
youtube-stream-status
A node module to check if YouTube channel is live
Installation
Node.js required
npm install @3xanax/youtube-stream-status
Usage
Require YouTube channel-id. Example: https://www.youtube.com/channel/UCiaoRUmpQ0mH05w9PVQzYPw
UCiaoRUmpQ0mH05w9PVQzYPw
is the channel-id string from the above url
const yt = require('@3xanax/youtube-stream-status');
yt.getStream("UCiaoRUmpQ0mH05w9PVQzYPw")
.then(data => {
console.log(data)
})
Example output when Live:
{
"stream": {
"_id": "UCiaoRUmpQ0mH05w9PVQzYPw"
}
}
Example output when Offline:
{
"stream": null
}
Support & Issues
IMPORTANT: Help me beeing efficient, please! I am developing in my free time for no money. Contribute to the project by posting complete, structured and helpful issues which I can reproduce quickly without asking for missing information.