UNPKG

get-youtube-channel-id

Version:

Get Youtube channel ID from Youtube's URL (async/await)

14 lines (10 loc) 386 B
const getYoutubeChannelId = require('./index'); (async () => { let url = '' url = 'https://www.youtube.com/channel/UCVfTp0vAXnuDL8SSI8tPYGA' console.log(await getYoutubeChannelId(url)) url = 'https://www.youtube.com/user/JustaTeeMusic' console.log(await getYoutubeChannelId(url)) url = 'https://google.com' console.log(await getYoutubeChannelId(url)) })()