the youtube-search-api not works for some videos. for eg this one 'https://www.youtube.com/watch?v=cWMxCE2HTag'
was not working for me. might work for you or might not
it could be due video metadata later changed by youtube or youtube restricted region access.
So if anyone having problem with this he can use
const oembedUrl = `https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${extractedId}&format=json`;
const res = await fetch(oembedUrl)
U can get the all needed data. just there will be only one thumbnail url. or if u want more thumbnail you try some other altrnative scrapping methods for thumbnails only
the
youtube-search-apinot works for some videos. for eg this one 'https://www.youtube.com/watch?v=cWMxCE2HTag'was not working for me. might work for you or might not
it could be due video metadata later changed by youtube or youtube restricted region access.
So if anyone having problem with this he can use
U can get the all needed data. just there will be only one thumbnail url. or if u want more thumbnail you try some other altrnative scrapping methods for thumbnails only