Created
October 21, 2018 07:42
-
-
Save sidouglas/8f6842b969293258c81f56d151a9b8c6 to your computer and use it in GitHub Desktop.
Youtube DL wrapped in applescript for audio only downloads to desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set theResponse to display dialog "Enter youtube url" default answer "" with icon note buttons {"Cancel", "Continue"} default button "Continue" | |
set theUrl to (text returned of theResponse) | |
set shellPath to "PATH=$PATH:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin:~/opt/bin:~/opt/sbin:/opt/local/bin:/opt/local/sbin:" & quoted form of (POSIX path of ((path to me as text) & "::")) & "; " | |
do shell script shellPath & "youtube-dl --ignore-errors -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o \"~/Desktop/%(title)s-%(id)s.%(ext)s\" " & theUrl | |
display dialog "Done" giving up after 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment