Retreive all video ids from a Youtube playlist
First, you have to get an api key for YouTube Data API v3
Create a .env
in the project root directory and add these variables:
API_KEY={YOUR API KEY}
PLAYLIST_ID={YOUR PLAYLIST ID}
Then just do
npm start
It'll print the video ids to stdout.
You can also handle everything in your terminal
npm start -- --api-key {YOUR API KEY} --playlist-id {YOUR PLAYLIST ID} > {TARGET FILE}