diff --git a/download.sh b/download.sh new file mode 100755 index 0000000..961123f --- /dev/null +++ b/download.sh @@ -0,0 +1,17 @@ +playlist="$1" + +[ "$playlist" == "" ] && printf "playlist must be defined\n" && exit 1 +mkdir "$playlist" +cd "$playlist" + +i=0 + +while [ $i -le 300 ] +do + item="$(sqlite3 ../youtube_stuffs.db "select id from ytlist where rowid=$i and category='$playlist'")" + printf "$i: $item\n" + if [ "$item" != "" ]; then + yt-dlp --cookies ~/cookies.txt "$item" 2>> ../err.txt + fi + ((i++)) +done