Skip to content

ttt3pu/get-yt-thumbnail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-yt-thumbnail

An util to get thumbnail uses YouTube video ID.

usage

getYtThumbnail(videoId, thumbType)

  • videoId (required) Any YouTube ID
  • thumbType (optional) Get less than or equal to the size this.
    • maxresdefault.jpg
    • sddefault.jpg
    • hqdefault.jpg
    • mqdefault.jpg
    • default.jpg
import getYtThumbnail from 'get-yt-thumbnail';

(async () => {
  // Get the largest size.
  const video = await getYtThumbnail('Any YouTube ID');
  console.log(video);

  // Get the largest size under sddefault.jpg.
  const video2 = await getYtThumbnail('Any YouTube ID', 'sddefault.jpg');
  console.log(video2);
})();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages