13 lines
365 B
Bash
Executable File
13 lines
365 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
LIST_ID="$1"
|
|
|
|
echo "${LIST_ID}" |egrep "^([a-zA-Z0-9\_\-]+)$" >/dev/null
|
|
if [ "$?" -eq "0" ]
|
|
then
|
|
LIST_URL="https://www.youtube.com/playlist?list=${LIST_ID}"
|
|
yt-dlp --netrc --netrc-location /root/.netrc --verbose --flat-playlist --print id "${LIST_URL}" | tee "allowed-playlists/${LIST_ID}.txt"
|
|
else
|
|
echo "Missing a valid list ID" >&2
|
|
fi
|