This guide explains how to install Python, set up Google OAuth credentials, and run the script that reports videos from one or more YouTube channels.
brew install python
.sudo apt install python3 python3-pip
.pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client
client_secret.json
).The script takes channels as a positional argument. This can be:
python report.py CHANNEL_OR_FILE --secret client_secret.json
--reason
: Abuse reason ID. If omitted, the script will prompt you.--message
: A text message to include with the report (prompted if omitted).--max-videos
: Maximum number of videos to report per channel (default: 1).--timeout
: Seconds to wait between reports (default: 0).# Report a single channel by ID python report.py UC1234567890abcdef --secret client_secret.json --message "Violation of YouTube policies" # Report a single channel by URL python report.py "https://www.youtube.com/@SomeChannel" --secret client_secret.json --message "Harassment and harmful content" # Report multiple channels from a file (one per line) python report.py bad_channels.txt --secret client_secret.json --message "Spam channel" --max-videos 3 --timeout 10 # Let the script prompt for the reason interactively python report.py UCabcdef123456 --secret client_secret.json --message "Misleading information" # Pre-specify a reason ID (skips the prompt) python report.py UCabcdef123456 --secret client_secret.json --reason N --message "Contains nudity"
token.json
file will be saved locally for future runs.Successful reports will print a confirmation message in the terminal. Failed reports (e.g., invalid reason, quota issues, not authorized) will show an error message.