2017-05-18 22:51:33 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
read -p "Wie ist die URL? : " url
|
2017-05-31 13:16:28 +02:00
|
|
|
read -p "Soll ein Video heruntergeladen werden oder Audio? [audio/video/opus] : " format
|
2017-05-18 22:51:33 +02:00
|
|
|
read -p "Wo sollen die Dateien heruntergeladen werden? : " pfad
|
|
|
|
|
2017-05-31 13:16:28 +02:00
|
|
|
if [ "$format" == "opus" ]
|
2017-05-18 22:51:33 +02:00
|
|
|
then
|
2017-05-29 22:20:42 +02:00
|
|
|
format=251
|
2017-05-31 13:16:28 +02:00
|
|
|
elif [ "$format" == "audio" ]
|
|
|
|
then
|
|
|
|
format=140
|
2017-05-18 22:51:33 +02:00
|
|
|
else
|
2017-05-31 13:16:28 +02:00
|
|
|
#video
|
2017-05-18 22:51:33 +02:00
|
|
|
format=43
|
|
|
|
fi
|
|
|
|
|
2017-05-31 13:16:28 +02:00
|
|
|
mkdir -p $pfad
|
|
|
|
|
2017-05-18 22:51:33 +02:00
|
|
|
cd $pfad
|
|
|
|
youtube-dl -i -f $format $url
|