Created
March 28, 2018 22:31
-
-
Save foofoodog/8d94902de3f6c1a24c1f8ed9a566b936 to your computer and use it in GitHub Desktop.
youtube-dl as a linux docker on windows
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
@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 |
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
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