Get Youtube Channel Id
Get Youtube channel ID from Youtube's URL (async/await)
Install
npm install get-youtube-channel-id
Usage
parameters
Field | Description | |
---|---|---|
url |
Required | Youtube's URL |
const getYoutubeChannelId = ; var url = 'https://www.youtube.com/user/JustaTeeMusic';// or var url = 'https://www.youtube.com/channel/UCVfTp0vAXnuDL8SSI8tPYGA'; var result = false; { result = await ; console; if result !== false if resulterror console; else console; else console; }; /* Resulthttps://www.youtube.com/user/JustaTeeMusic { id: 'UC_Eqg-tBPUUvA0heBZfdu6Q', username: 'JustaTeeMusic', error: false} https://www.youtube.com/channel/UCVfTp0vAXnuDL8SSI8tPYGA { id: 'UCVfTp0vAXnuDL8SSI8tPYGA', username: false, error: false} https://google.com/ false */
License
MIT