youtube-dl
youtube-dl copied to clipboard
How to output playlist title as file name
Checklist
- [x] I'm asking a question
- [x] I've looked through the README and FAQ for similar questions
- [x] I've searched the bugtracker for similar questions including closed ones
Question
Hi everyone.
Objective: I would like to output (dump) the list of videos within a playlist to a json formatted file - having the playlist title as the file name.
Current Solution:
At the moment I use the following syntax:
youtube-dl --flat-playlist --dump-json https://www.youtube.com/playlist?list=<insertplaylistid> > output.json
Problem: The problem is that i have to manually rename the file to the playlist title, which is time consuming to do for multiple playlists.
Ultimate Solution: (Ideally I would list the playlist id's in a text file and the script goes through it and outputs the json file automatically which would be the ultimate solution.)
OS: Windows 10 Terminal: Command Prompt
Thank you for your help!