Skip to main content

Easily scan for and delete scam comments on your YouTube channel.

Project description

yt-spam-purge

ci documentation pypi version gitter Code style: black

Easily scan for and delete scam comments on your YouTube channel.

This is REWRITE of the tool made by ThioJoe. I want to refactor it into a proper library with CLI and utilizing async for blazing-fast operation.


Part of original README:

What Is This? - Allows you to filter and search for spammer comments on your channel and other's channel(s) in many different ways AND delete/report them all at once (see features below).

How to Download: Click the "Releases" link on the right, then on the latest release, under 'Assets' click to download "YTSpammerPurge.exe". (You might have to click "Assets" to view the files for the release)

Detailed Info & Documentation → Visit the wiki (Click Here) for more detailed writeups on the program

Features

  • 15 Different Filtering Methods
    • Auto-Smart Mode (Recommended): Automatically detects multiple spammer techniques
    • Sensitive-Smart Mode: More likely to catch elusive spammers, but with more false positives
    • Scan by Channel ID: Enter a known spammer's channel link or ID directly
    • Scan Usernames for: Individual special characters, individual strings, or using a custom Regex expression
    • Scan Comment Text: (Same 3 options as above)
    • Scan Usernames and Comment Text simultaneously: (Same 3 options as above)
    • ASCII Mode: Scan Usernames for non-ASCII special characters (three different sensitivities)
  • 4 Different Scanning Modes
    • Scan a single video
    • Scan Recent Videos (Up to 5)
    • Scan recent comments across entire channel (all videos)
    • Experimental: Scan a community post
  • Automatic deletion of all found comments (after confirmation), as well as the option to ban them
  • Options to instead Report spam comments or 'Hold For Review'
  • Ability to create config file to skip pre-set options
  • Rich text log files
  • 'Recovery Mode' option to re-instate previously deleted comments
  • Displays "match samples" after printing comments list to easily spot false positives
  • Ability to exclude selected authors before deletion / reporting

Purpose

Recently, there has been a massive infestation of spam on YouTube where fake impersonator accounts leave spam/scam replies to hundreds of users on a creator's videos. For some god-forsaken reason, YouTube offers no way to delete all comments by a specific user at once, meaning you must delete them one by one BY HAND.

YouTube offers a functionality to ban a user, but it does NOT delete previous comments. Therefore I created this script to allow you to instantly purge their spam replies, and since then it has evolved into a fully featured spam scanner as well. IT DOES NOT PREVENT SPAMMERS - It only makes it easier to delete them when they show up! YouTube still must implement better native tools for dealing with spammers.

🤔 Pro-Tip If This Seems Sketchy: Limiting The App's Access 🤔

If you feel sketched out about giving the app the required high level permissions to your channel (very understandable), you could instead use the app in 'moderator mode' (set in the config file). First, some context: When you grant access to another channel to be a moderator for your channel, they are able to mark comments for 'held for review', and this permission works through the API as well.

Therefore, what you could do is create an blank dummy-google-account with nothing on it except a empty new channel. Then you can grant that channel permission to be a moderator, and use the app through the dummy moderator account. This way, you know that the app will never have the ability to do more than mark comments as held for review (which the app supports) on your main channel, and have no other access to your account's data. You just won't be able to ban the spammers through this app directly, but you can still remove/hide their comments instead of deleting them. Just make sure to create the google cloud API project on the dummy account instead.

Read some additional details about 'moderator mode' on the wiki page here.

Usage Notes -READ THIS

  1. To use this script, you will need to obtain your own API credentials file by making a project via the Google Developers Console (aka 'Google Cloud Platform'). The credential file should be re-named client_secret.json and be placed in the same directory as this script. See Instructions Here.

  2. IF IT FREEZES while scanning, it is probably because you clicked within the command prompt window and entered "selection mode" which pauses everything. To unfreeze it, simply right click within the window, or press the Escape key.

  3. I'm a total amateur, so if something doesn't work I'll try to fix it but might not even know how, so don't expect too much. Therefore I OFFER NO WARRANTY OR GUARANTEE FOR THIS SCRIPT. USE AT YOUR OWN RISK. I tested it on my own and implemented some failsafes as best as I could, but there could always be some kind of unexpected bug. You should inspect the code yourself.


Requirements

yt-spam-purge requires Python 3.10 or above.

To install Python 3.10, I recommend using pyenv.
# install pyenv
git clone https://github.com/pyenv/pyenv ~/.pyenv

# setup pyenv (you should also put these three lines in .bashrc or similar)
export PATH="${HOME}/.pyenv/bin:${PATH}"
export PYENV_ROOT="${HOME}/.pyenv"
eval "$(pyenv init -)"

# install Python 3.10
pyenv install 3.10.0

# make it available globally
pyenv global system 3.10.0

Installation

With pip:

python3.10 -m pip install yt-spam-purge

With pipx:

python3.10 -m pip install --user pipx

pipx install --python python3.10 yt-spam-purge

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yt-spam-purge-3.0.0a3.tar.gz (161.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yt_spam_purge-3.0.0a3-py3-none-any.whl (163.7 kB view details)

Uploaded Python 3

File details

Details for the file yt-spam-purge-3.0.0a3.tar.gz.

File metadata

  • Download URL: yt-spam-purge-3.0.0a3.tar.gz
  • Upload date:
  • Size: 161.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0a2 CPython/3.10.0 Linux/5.16.2-1-MANJARO

File hashes

Hashes for yt-spam-purge-3.0.0a3.tar.gz
Algorithm Hash digest
SHA256 301af43e03ec32a205d211778b0bb74f6a59f28d15358b04a31ed5328d2d9d93
MD5 e5314307c68236c27435672e064c49b3
BLAKE2b-256 6742a93be3adf71a1fd0c1892f942734b47be8477a0e4157a17681f577fb0ac7

See more details on using hashes here.

File details

Details for the file yt_spam_purge-3.0.0a3-py3-none-any.whl.

File metadata

  • Download URL: yt_spam_purge-3.0.0a3-py3-none-any.whl
  • Upload date:
  • Size: 163.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0a2 CPython/3.10.0 Linux/5.16.2-1-MANJARO

File hashes

Hashes for yt_spam_purge-3.0.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 8d562fc54567ce645c5f36c9354ae31d028df3fdc5d8b3950e98c148c77c6b06
MD5 b115ce4719e313d51be6838f1abae8cc
BLAKE2b-256 fa7ae12e3504965b6cae8dee9d43f79f0f45a7ff940942fa1cae9d0271ebbf60

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page