mirror of
https://github.com/iAmInActions/random-scripts.git
synced 2024-11-23 20:50:13 +00:00
Add download
Bulk download MP3s from youtube.
This commit is contained in:
parent
58693ec78f
commit
e8691d526c
15
youtube2mp3/download.sh
Normal file
15
youtube2mp3/download.sh
Normal file
@ -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 <songs.txt
|
Loading…
Reference in New Issue
Block a user