Simple YouTube download script

Packages zenity, xsel, xterm and youtube-dl must be installed.

Copy video address and choose ”Yes” for downloading the video. Video goes to the same directory, where the script is.

The script:

video=$(xsel --clipboard)
zenity --question --text "youtube dl, xsel and xterm must be installed, so that script would working. If them are installed choose Yes and continue to download the video?"
if [ $? = 0 ];
xterm -e youtube-dl $video && zenity --info --text "Video downloaded!" && xdg-open $PWD
else exit 0
exit 1

A better script:

video=$(xsel --clipboard)
inputStr=$(zenity --entry --title="Youtube lataaja" --text="Laita videon osoite allaolevaan laatikkoon:")
zenity --info --text="Laittamasi osoite = $inputStr"
xterm -e youtube-dl $video && zenity --info --text "Video ladattu!" && xdg-open $PWD
exit 0