How to download youtube videos using open source software
If you’ve tried to download youtube videos while trying not to download malware, this is for you.
You will need to have Docker installed, and know if your terminal uses bash or zsh.
All you have to do is use this incantation
alias yt-dl='docker run \
--rm -i \
-e PGID=$(id -g) \
-e PUID=$(id -u) \
-v "$(pwd)":/workdir:rw \
Add 👆this to your ~/.bash_aliases file or ~/.bashrc or ~/.zshrc file.
Once you’ve done that (and used
source ~/.zshrc , or whatever the name of your rc file you updated) you can download videos by using
Further reading: https://hub.docker.com/r/mikenye/youtube-dl#quick-start
Disclaimer: this might work for apple and linux devices only. Post a comment if you need help.
yt-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=KvknOXGPzCQ