curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o yt-dlp && chmod a+rx yt-dlp
sudo apt-get install curl ffmpeg jq
curl -fsSL "https://dl.deno.land/release/$(curl -fsSL https://dl.deno.land/release-latest.txt)/deno-x86_64-unknown-linux-gnu.zip" -o /tmp/deno.zip && unzip -o -j -d . /tmp/deno.zip && chmod +x ./deno && rm -f /tmp/deno.zip
./yt-dlp --js-runtimes deno:./deno
Copy from YouTube channel page all playlists using firefox console and store in list.txt
Array.from(document.querySelectorAll( "ytd-grid-playlist-renderer.style-scope > div:nth-child(2) > h3:nth-child(1) > a:nth-child(1)")).map(el => el.href).join("\n");copy(out);
Download all playlists
#!/bin/bash
while IFS= read -r url || [ -n "$url" ]; do
[ -z "$url" ] && continue
./yt-dlp \
--js-runtimes deno:./deno \
-f bestaudio \
--extract-audio \
--audio-format mp3 \
--audio-quality 192K \
--embed-thumbnail \
--add-metadata \
--metadata-from-title "%(artist)s - %(title)s" \
--retries 10 \
--fragment-retries 10 \
--continue \
-o "%(playlist_title)s/%(playlist_index)s - %(title)s.%(ext)s" \
"$url"
done < list.txt