Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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