Extract links, ids, durations and names from a youtube playlist
Install
$ npm install --save youtube-playlist
Usage
urls
const ytlist = ; const url = 'https://www.youtube.com/playlist?list=PLWKjhJtqVAbnZtkAI3BqcYxKnfWn_C704'; ; // or ;
names
;
ids
durations
multiple details
; // or ;
Notice: In multiple details
- another prop will be added. isPrivate
will be true when the video is private (for not loggedin user).
API
opts
-
id
:
returns only ids of all the videos present in a playlist
-
url
:
returns only urls of all the videos present in a playlist
-
name
:
return only name of the videos present in a playlist
-
duration
:
return only duration (in seconds) of the videos present in a playlist
-
Passing
opts
either asurl
or an array of options['id', 'name', 'url', 'duration']
returns all the details.
Type of
-
url
:
string
-
opts
:
string
orarray
NOTE
-
This
api
already supportsurl-redirection
, so you are free to use the shortened url. -
For data extraction, you can either choose -
playlist url
url of the content from playlist
#1
Related
Pufetch
:
The best youtube playlist url scrapper and exporter!
License
MIT © Rishi Giri