1.0.2 • Published 2 years ago

identify-youtube-shorts v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

identify-youtube-shorts

Identify whether a youtube video is shorts or not

Install

npm install identify-youtube-shorts

Usage

checkIfYoutubeShorts(videoID) -> Promise(boolean)

Note: checkIfYoutubeShorts is an async function

Example

const checkIfYoutubeShorts = require('identify-youtube-shorts');
const videoID = "dQw4w9WgXcQ";
async function example(videoID){
    const ifShorts = await checkIfYoutubeShorts(videoID);
    console.log(ifShorts); // true or false according to the video
}
example(videoID)

Errors

The Function will raise a IdentifyYoutubeShortsError Error with the cause.