1.0.11 • Published 3 years ago
@hrtube/ytpl v1.0.11
node-ytpl
Simple js only module to resolve YouTube playlist ids Doesn't need any login or GoogleAPI key
Forked from ytpl.
Support
You can contact us for support on our chat server
Usage
var ytpl = require('ytpl');
ytpl('UU_aEa8K-EOJ3D6gOs7HcyNg').then(playlist => {
dosth(playlist);
}).catch(err => {
console.error(err);
});
API
ytpl(id, options)
Attempts to resolve the given playlist id
id
- id of the yt-playlist
- or playlist link
- or user link (resolves uploaded playlist)
- or channel link (resolves uploaded playlist)
options
returns a Promise
- Example response
ytpl.validateID(string)
Returns true if able to parse out a (formally) valid playlist ID.
ytpl.getPlaylistID(string)
Returns a playlist ID from a YouTube URL. Can be called with the playlist ID directly, in which case it resolves.
Returns a promise.
Related / Works well with
Install
npm install --save ytpl
License
MIT
1.0.11
3 years ago