Last active
March 28, 2019 21:07
-
-
Save vbarbarosh/76ca966be71aebacf3b88fe027c8112d to your computer and use it in GitHub Desktop.
shell_youtube – Downloading videos from youtube https://codescreens.com
This file contains hidden or 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
| #!/bin/bash | |
| # http://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin | |
| # http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
| set -o nounset -o errexit -o pipefail | |
| # Download all videos from channel | |
| youtube-dl https://www.youtube.com/channel/UCVqD-Rd1nMmvbvf-AvQvgZw | |
| # Download a list of videos using urls | |
| youtube-dl \ | |
| https://www.youtube.com/watch?v=u2oKnsiXBr8 \ | |
| https://www.youtube.com/watch?v=hNRTc5mEn7I \ | |
| https://www.youtube.com/watch?v=rdETpKXowsI | |
| # Download a list of videos using video ids | |
| youtube-dl u2oKnsiXBr8 hNRTc5mEn7I rdETpKXowsI | |
| # List all videos from playlist | |
| youtube-dl -j --flat-playlist PLqf_9W8aN7TP4gLuFivNRMSznrY364L2k \ | |
| | jq -r .id | awk '{print "https://youtu.be/" $0}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment