I am hoping to make an automator application that prompts the user for input (i.e. youtube url), and downloads it using youtube-dl (already installed via Homebrew). After this, I am trying to use the command
youtube-dl URL_HERE -e which fetches the title of the video. I am hoping to make a notification that says "successfully downloaded TITLE_VIDEO" after it downloads successfully (if it downloads succesfully). I am using the "Run Applescript" command of automator.
This is all I've gotten so far:
display dialog "What is the youtube URL you want to download?" default answer "" set answer to text returned of result tell application "Terminal" activate do script with command "youtube-dl -f 140 " & answer end tell display notification "Successfully downloaded " & TITLE_HERE sound name "Blow"
I'm new to applescript, so only basic functions/ones that can be explained easily.
What I'm thinking is to do the terminal command
youtube-dl URL_HERE -e which will return the title of the video (TITLE), and set that to a variable and then pass that variable to