From e8691d526c236f1f39ebc10366347a77006bf04a Mon Sep 17 00:00:00 2001 From: iAmInAction <83808704+iAmInActions@users.noreply.github.com> Date: Sat, 8 Jul 2023 15:06:11 +0200 Subject: [PATCH] Add download Bulk download MP3s from youtube. --- youtube2mp3/download.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 youtube2mp3/download.sh diff --git a/youtube2mp3/download.sh b/youtube2mp3/download.sh new file mode 100644 index 0000000..8daedef --- /dev/null +++ b/youtube2mp3/download.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Reads songs from songs.txt formatted in the following way: +# Artist_-_Song_name +# The song names may not contain the " character. +# Made by mueller_minki in 2023. + +while read i; do + if [[ ! -e "./out/$i.mp4" ]] + then + yt-dlp -f 'ba' -x --audio-format mp3 --output "./out/$i.mp3" "ytsearch1:${i//_/ }" + sleep 1 + else + echo "$i was already downloaded." + fi +done