Commit
·
f8a38ca
1
Parent(s):
4ae32d3
Download videos without audio
Browse files
modules/download_from_youtube.sh
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
#!/bin/bash
|
2 |
# Options
|
3 |
-
PLAYLIST_URL=https://youtube.com/playlist?list=PLwlIgd6_8FLJqgvIgtUye8Jz2jSKLrCAI
|
|
|
4 |
# ----- Start script -----
|
5 |
# get playlist name
|
6 |
PLAYLIST_NAME=$(yt-dlp --no-warnings --dump-single-json --playlist-end 1 $PLAYLIST_URL | jq -r '.title')
|
@@ -9,4 +10,8 @@ echo "Playlist Name:" $PLAYLIST_NAME
|
|
9 |
SCRIPT_DIR=$(cd $(dirname $0); pwd)
|
10 |
mkdir -p $SCRIPT_DIR/../download/youtube/$PLAYLIST_NAME
|
11 |
cd $SCRIPT_DIR/../download/youtube/$PLAYLIST_NAME
|
12 |
-
|
|
|
|
|
|
|
|
|
|
1 |
#!/bin/bash
|
2 |
# Options
|
3 |
+
readonly PLAYLIST_URL=https://youtube.com/playlist?list=PLwlIgd6_8FLJqgvIgtUye8Jz2jSKLrCAI
|
4 |
+
readonly NO_AUDIO=true
|
5 |
# ----- Start script -----
|
6 |
# get playlist name
|
7 |
PLAYLIST_NAME=$(yt-dlp --no-warnings --dump-single-json --playlist-end 1 $PLAYLIST_URL | jq -r '.title')
|
|
|
10 |
SCRIPT_DIR=$(cd $(dirname $0); pwd)
|
11 |
mkdir -p $SCRIPT_DIR/../download/youtube/$PLAYLIST_NAME
|
12 |
cd $SCRIPT_DIR/../download/youtube/$PLAYLIST_NAME
|
13 |
+
if "${NO_AUDIO}"; then
|
14 |
+
yt-dlp -f "bv" $PLAYLIST_URL
|
15 |
+
else
|
16 |
+
yt-dlp -f "bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]" $PLAYLIST_URL
|
17 |
+
fi
|