Open mY9Yd2 opened 3 months ago
Slow, but separate solution:
#!/usr/bin/env bash
mapfile -t file_data < "channels.yaml"
for data in "${file_data[@]}"; do
# Remove whitespaces from the string
data="$(echo -e "${data}" | tr -d '[:space:]')"
# We are only interested in data that starts with -"@
if [[ $data == '-"@'* ]]; then
# Remove -" from the beginning of the string
data="${data#'-"'}"
# Remove " from the ending of the string
data="${data%'"'}"
url="https://www.youtube.com/$data"
yt-dlp --simulate --quiet --no-warnings --max-downloads 1 --print channel "$url"
fi
done
yt-dlp will tell you if there is an error.
What happens if someone changes their unique @ handle name? How should we handle this?
Or should it be checked regularly and separately by the user?