Trying to download a YouTube playlist with educational videos for when I am traveling, made me bump into this awesome way to locally (!) download a YouTube Playlist.
For this we use the well known tool yt-dlp which can be found for free on Github.
Available for macOS, Windows and Linux for free!
This command which worked great on my Mac (ARM), to pull a playlist (up to 1080p):
yt-dlp_macos --merge-output-format mp4 -o "%(playlist_index)s - %(title)s.%(ext)s" "youtube-link-to-playlist"
The "youtube-link-to-playlist" is the link in the address bar of your browser when you're looking at a linklist.
Something like " https://www.youtube.com/playlist?list=PLrxYxzKOtC_-C8rHalpgngoe9e2-x48ZC ".
All videos will be downloaded now, in the best resolution up to 1080p, and each video file will be saved based on their title.
Tip: if you want to download music as MP3's then try this:
yt-dlp -x --audio-format mp3 --audio-quality 0 -o "%(playlist_index)s - %(title)s.%(ext)s" "youtube-link-to-playlist"