Skip to content

Instantly share code, notes, and snippets.

@foofoodog
Created March 28, 2018 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foofoodog/8d94902de3f6c1a24c1f8ed9a566b936 to your computer and use it in GitHub Desktop.
Save foofoodog/8d94902de3f6c1a24c1f8ed9a566b936 to your computer and use it in GitHub Desktop.
youtube-dl as a linux docker on windows
@echo off
if %1.==. goto err
docker build -q -t utube . > nul
docker run --rm -v"%cd%":/data -e url="%*" utube
goto :eof
:err
echo needs 1 url arg
from ubuntu
run apt-get update; \
apt-get install wget -qy; \
apt-get install python -qy; \
wget https://yt-dl.org/downloads/latest/youtube-dl; \
chmod +x youtube-dl;
cmd ./youtube-dl $url --exec 'mv {} /data' --restrict-filenames
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment