Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unique handle name change(s) or non-existent #7

Open
mY9Yd2 opened this issue Aug 3, 2024 · 1 comment
Open

Unique handle name change(s) or non-existent #7

mY9Yd2 opened this issue Aug 3, 2024 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@mY9Yd2
Copy link
Owner

mY9Yd2 commented Aug 3, 2024

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?

@mY9Yd2 mY9Yd2 added bug Something isn't working enhancement New feature or request labels Aug 3, 2024
@mY9Yd2
Copy link
Owner Author

mY9Yd2 commented Aug 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant