Skip to content

Instantly share code, notes, and snippets.

@hoenirvili
Created June 8, 2017 17:14
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 hoenirvili/e6778408f2200c84af3422ed2afea318 to your computer and use it in GitHub Desktop.
Save hoenirvili/e6778408f2200c84af3422ed2afea318 to your computer and use it in GitHub Desktop.
Youtube downloader playlist script
#!/bin/sh
echo -e '\033]0;'YouTube MP3 Downloade'\007'
clear
echo Enter the number of threads:
read threads
echo Enter the link of the playlist you want to download:
read link
number=$(youtube-dl -s -f -1 $link | grep -Po '(?<=1 of ).*')
for ((i=0; i<$threads; i++))
do
xfce4-terminal -e "youtube-dl --playlist-start $((number*i/threads+1)) --playlist-end $((number*(i+1)/threads)) -f bestaudio --extract-audio --audio-format mp3 --audio-quality 4 -i -o ~/Downloads/Songs/%(title)s.%(ext)s $link"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment