• Stars
    star
    4,529
  • Rank 9,410 (Top 0.2 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created about 3 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Allows you easily scan for and delete scam comments using several methods.

Icon
YouTube Spammer Purge


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. YouTube has fortunately now made it so the "Hide User From Channel" button instantly removes all of that user's comments, but there are sometimes many different spammers, and it can be difficult to find them all.

Therefore I created this script to allow you to easily scan for and purge these spammer comments. 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.

An Additional Note: No matter the settings, the program runs completely locally on your own machine using the API key and Google Cloud project you created yourself, so even as the program's creator I will never have access to your channel.

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.

Video: Project Demonstrations

Latest Demonstration Video: https://www.youtube.com/watch?v=2tRppXW_aKo

Demo Updated Thumbnail

Original Demo for Context: https://www.youtube.com/watch?v=-vOakOgYLUI

Demo 1 Thumbnail

(Takes you to YouTube, not embedded. See timestamps in video description.)

Screenshots

Opening Menu


Opening Menu

Filter Mode Selection


Filter Mode Selection

Scanning
(Auto Smart Mode)


Scanning (Auto Smart Mode)

Matched Comments List


Matched Comments List

Match Samples and Deletion Menu


Match Samples and Deletion Menu

Installation

If using the python script version (not the exe), there is a requirements.txt with necessary modules. Created with Python 3.9.7

Either way, you DO need to acquire your own API credentials file to access the YouTube API - See Instructions Here.

Operating System Specific Instructions:

Windows

On Windows, you may download the latest EXE file from the Releases page, or you may install YTSpammerPurge manually. If you are not sure how to install YTSpammerPurge manually, it is probably best to install the EXE.

Linux / MacOS

The easiest way to install YTSpammerPurge is using the install script.

bash <(curl -s https://raw.githubusercontent.com/ThioJoe/YT-Spammer-Purge/main/install.sh)

See one of the following if you need further help:

Updating

To update YTSpammerPurge, run the install.sh file inside your installation.

Manual Installation

If your system is not yet supported by the install script, you may install YTSpammerPurge manually by following the guide Here (Linux Setup Instructions)

Docker Instructions:

Before running docker-compose you must run the YTSpammerPurge.py script at least once with your client_secrets.json file to confirm OAuth credentials and generate the config/token files.

The generated config files, token, and Spam Purge Resources will all be bound to the docker container via volumes.

Once you generated the token and config files you are ready to run the docker image.

Now you can run docker-compose up to start the container, or use the image to run on a Kubernetes cluster for example. To build your own version you can run this command: docker-compose -f docker-compose.yml -f docker-compose.override.yml up --build

Instructions - Obtaining YouTube API Key

To use this script, you will need an "Oauth2" credential to access the scanning and deletion functions via YouTube's Data API. Otherwise this script won't work at all.

More Repositories

1

Auto-Synced-Translated-Dubs

Automatically translates the text of a video based on a subtitle file, and also uses AI voice to dub the video, and synced using the subtitle's timings
Python
1,534
star
2

Full-Stack-AI-Meme-Generator

Uses Various AI Service APIs to generate memes with text and images
Python
265
star
3

youtube-dl-easy

Easy script for running youtube-dl with basic options
PowerShell
149
star
4

F-Key-Sender

Lets you send keystrokes for F13 to F24 keys via buttons, including with modifiers
C#
108
star
5

SRT-To-SSML

Converts SRT subtitle file to SSML file with speech durations
Python
85
star
6

YT-Spam-Lists

List of known domains used in scam comments on YouTube
80
star
7

LibWebpToolsGUI

Basic GUI wrappers for certain LibWebp binaries to handle WebP image files
C#
69
star
8

Basic-OpenAI-API-Scripts

Basic scripts for interacting with the OpenAI API.
Python
42
star
9

ThioJoe-Official-Certificates

A list of my self-signed certificates and public keys you can use to verify software, etc actually came from me.
19
star
10

csgoLyrics

Generates a cfg script based on a lyrics file that allows the player to display the lyrics of any song line by line, using only one key bind.
C++
13
star
11

Gmic-Animation-Tools

Tools for creating animations using other normally static image effect tools
C#
13
star
12

BasicStabilityAPI-GUI

A basic GUI for interacting with the Stability AI API for Stable Diffusion 3
C#
12
star
13

D-Opus-Scripts

Scripts for use with Directory Opus
JavaScript
9
star
14

Analyze-Evergreen-YT-Videos-Macro

Determines the current monthly performance of videos of different age ranges.
VBA
8
star
15

Hue-Bulb-Replacer

Python script for easily replacing an old Philips Hue bulb with a new one, and copying Group and Scene data
Python
7
star
16

Basic-Stability-API-Scripts

Basic scripts for interacting with the Stability AI Stable Diffusion API.
Python
3
star
17

FastSigCheck

Simple lightweight tool that uses the WinVerifyTrust Windows API function to check embedded file signatures with as little overhead as possible.
C++
2
star