#!/bin/sh ## Created by Amdac @ www.amdac.net ## This script requires "youtube-dl" to be installed, available in any distribution's respository ## Downloads go to your /home/user/downloads/ directory. bold=$(tput bold) norm=$(tput sgr0) read -p "Paste URL: " url echo "${bold}Choose option:${norm}" echo "${bold}[1]${norm} Audio (opus)" echo "${bold}[2]${norm} Video" echo "${bold}[3]${norm} Thumbnail" read -p "Enter [1,2,3]: " type case $type in 1) youtube-dl --add-metadata -x --audio-quality 0 --audio-format opus -o '~/downloads/%(title)s.%(ext)s' $url ;; 2) youtube-dl --add-metadata -o '~/downloads/%(title)s.%(ext)s' $url ;; 3) youtube-dl --write-thumbnail --skip-download -o '~/downloads/%(title)s.%(ext)s' $url ;; esac