Created
January 22, 2017 07:38
-
-
Save keisei1092/c043caef6f6de2082a9d22d8dfbb61d8 to your computer and use it in GitHub Desktop.
This file contains 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
require 'sinatra' | |
set :port, 4568 | |
get '/youtube-dl/:id' do | |
`youtube-dl -o '~/Desktop/%(title)s.%(ext)s' --add-metadata -x --audio-format mp3 'https://www.youtube.com/watch?v=#{params[:id]}'` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment