yt-getvideos
v2.1.3
Published
Simple functions to get video information, list videos from a channel and search.
Downloads
62
Maintainers
Readme
yt-getvideos
Simple and complete youtube search API
Installation
npm install yt-getvideos
Easy to use
Searching for videos
const { search } = require('yt-getvideos');
search('Something you want to research').then(result => {
console.log(result);
});
Channel videos
const { channelVideos } = require('yt-getvideos');
/*
Examples of links that are accepted:
- https://www.youtube.com/c/Fireship/videos
- https://www.youtube.com/channel/UCsBjURrPoezykLs9EqgamOA/videos
*/
channelVideos('https://www.youtube.com/c/Fireship/videos').then(result => {
console.log(result);
});
Single video info
const { videoInfo } = require('yt-getvideos');
/*
Example:
Link: https://www.youtube.com/watch?v=WBwfRBdaRiC
The video hash id is `WBwfRBdaRiC`
*/
videoInfo('VIDEO-HASH-ID').then(result => {
console.log(result);
});
About
Simple functions to get video information, list videos from a channel and search.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.