Autor: @WizardIP
Descripción: Script que permite extraer audio de vídeos de Youtube
Motor del Script visto en Command Line Fu
#!/bin/bash
if [ $# -eq 0 ]
then
echo "¿Y el link?"
echo "Uso: $0 [ URL del vídeo ]"
exit 1
fi
url=$1
regexp='(https?\:\/\/([a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)(\/\w+)+)'
if [[ $1 =~ $regexp ]]; then
ifyoutubedl=`type -p youtube-dl`
if [ -z $ifyoutubedl ]; then
echo -e "\n\nyoutube-dl necesita estar instalado\n"
exit 1
else
youtube-dl -t --extract-audio --audio-format mp3 $1
echo "Sonido extraído"
ls | grep *.mp3
exit 0
fi
else
echo "No es una URL"
exit 1
fi
exit 0
Permisos: chmod 700 Youtube2mp3.bash Ejecución ./Youtube2Mp3.bash. [ URL del vídeo ]
0 comentarios:
Publicar un comentario