Very spartan Web and REST interface for downloading youtube videos onto a server. bottle
+ youtube-dl
.
This example uses the docker run command to create the container to run the app. Here we also use host networking for simplicity. Also note the -v
argument. This directory will be used to output the resulting videos.
Enabled port forwarding(80 - 8080), volume mount(download dir), keep /usr
directory in this case.
docker run -d -p 80:8080 --name youtube-dl --mount type=bind,src=<download directory>,dst=/youtube-dl -v v1:/usr ycrack/youtube-dl-webui
Same for PowerShell.
Downloads can be triggered by supplying the {{url}}
of the requested video through the Web UI or through the REST interface via curl, etc.
Just navigate to http://{{host}}/youtube-dl
and enter the requested {{url}}
.
curl -X POST --data-urlencode "url={{url}}" http://{{address}}/youtube-dl/q
The server uses bottle
for the web framework and youtube-dl
to handle the downloading. The integration with youtube-dl makes use of their python api.
This docker image is based on python:slim
and consequently debian:stretch-slim
.
- Omit waste code and addjusted in README.md.
- Rewrite it to appropriate command in README.md.
- Add code for install PhantomJS to Dockerfile. (because it is used for several sites, in youtube-dl.)