Skip to content

Instantly share code, notes, and snippets.

@inket
Last active February 2, 2016 15:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save inket/78c18c1cb027311192ca to your computer and use it in GitHub Desktop.
Save inket/78c18c1cb027311192ca to your computer and use it in GitHub Desktop.
heroku-youtube-dl
# Usage:
# ruby -e "$(curl <url_to_this_raw_gist>)" https://www.youtube.com/watch?v=Jo1tjBmwuXI
youtube_url = ARGV[0]
puts "YouTube URL: #{youtube_url}"
`mkdir youtube`
Dir.chdir "youtube"
`curl https://yt-dl.org/downloads/2014.10.13/youtube-dl > youtube-dl`
`chmod 755 youtube-dl`
`./youtube-dl #{youtube_url} -o video.mp4`
`git clone https://code.google.com/p/plowshare/ plowshare4; cd plowshare4; make install PREFIX=/app/youtube`
puts `./bin/plowup zippyshare video.mp4`
@mrprogramator
Copy link

how it works?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment