Skip to content

Instantly share code, notes, and snippets.

@Maxzor
Last active September 15, 2023 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Maxzor/ab37861ee686451b8761a43b4372b900 to your computer and use it in GitHub Desktop.
Save Maxzor/ab37861ee686451b8761a43b4372b900 to your computer and use it in GitHub Desktop.
Get your offline JuliaPlaysGroove covers 101 - https://www.youtube.com/channel/UCQ3ztZlbhR9RT09d4HAaVMA
#make room :
# 4GBs 99 songs as of 20230916
# 3GBs 66 songs as of 20210529
#install latest youtube-dl (superseded by yt-dlp)
cd && git clone https://github.com/yt-dlp/yt-dlp
#install jq the json parser
sudo apt install jq
#create the music directory
cd ~ && mkdir juliaplaysgroove_flac && cd "$_"
#download the metadata (50 video ids per json page) from youtube data api v3, then parse json with jq and proceed to download the audio files
#Julia mastapiece - page 1
curl 'https://youtube.googleapis.com/youtube/v3/search?channelId=UCQ3ztZlbhR9RT09d4HAaVMA&maxResults=100&key=AIzaSyA_Ow66sOSgXHNDohBEg5Sa64vsUzSA_t8' | \
jq '@uri "https://www.youtube.com/watch?v=\(.items[] | .id | .videoId)"' | xargs -Iya ~/yt-dlp/./yt-dlp.sh --break-on-existing -x --audio-format flac ya
#Julia mastapiece - page 2
curl 'https://youtube.googleapis.com/youtube/v3/search?channelId=UCQ3ztZlbhR9RT09d4HAaVMA&maxResults=100&pageToken=CDIQAA&key=AIzaSyA_Ow66sOSgXHNDohBEg5Sa64vsUzSA_t8' | \
jq '@uri "https://www.youtube.com/watch?v=\(.items[] | .id | .videoId)"' | xargs -Iya ~/yt-dlp/./yt-dlp.sh --break-on-existing -x --audio-format flac ya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment