YouTube Spammer Purge

Allows you to purge all comments left by a user on a specific video or across the entire channel.

How to Download: Click the “Releases” link on the right, then on the latest release, under ‘Assets’ click to download “YouTubeSpammerPurge.exe”. NOTE: You may get a warning – See “Download & Windows Warning” section below for details.

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.

Usage Notes – IMPORTANT!

  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 below.

  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. At the moment, this program doesn’t ban the user, so do that yourself before deleting their comments. I’ll add that function in the next version.

  4. 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 Explanation, Demonstration, and Setup Walkthrough

Regular Link: https://www.youtube.com/watch?v=-vOakOgYLUI

Explanation Video Screenshot Link
(Takes you to YouTube, not embedded. See timestamps in video description.)

Screenshots

Screenshot 1

Screenshot 2

Installation

If using the python script version (not the exe), there is a requirements.txt with necessary modules.
Either way, you DO need to acquire your own API credentials file to access the YouTube API – See instructions below.

Download & Windows Warning

Because I haven’t published software before, web browsers and Windows might block the exe from downloading / running as “unrecognized” until it builds a reputation as being safe. In the meantime, you can simply unblock the program by Right Clicking > Properties > Check ‘Unblock’ > Click Apply. You can confirm the download by selecting “keep”. (If you see these warnings at all)

Download Warnings

Unblock Warning

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.
Video walking through these same steps here (Go to 11:33) https://youtu.be/-vOakOgYLUI?t=693

  1. Log into Google Developer’s Console with your Google account that has your YouTube channel.

  2. On the top blue bar nex to where it says “Google Cloud Platform”, click the dropdown to ‘Select a Project’. (If you have existing projects, it may instead show the name of one)

2

  1. In the “Select a Project” Window click “New Project”

3

  1. Enter some project name, it doesn’t really matter, then click ‘Create’

4

  1. Make sure the project you just created is active, with it showing at the top, then click “Library” on the left menu.

5

  1. Scroll down and click the box that says “YouTube Data API v3”

6

  1. Click “Enable” and wait for it to load. It will take you to another page.

7

  1. Click “Create Credentials”.
    (Note: If you don’t see this page, open the left pop-out menu and click “APIs & Services” > “Dashboard”. Then in the table/list on the page, look in the ‘Name’ column, and click “YouTube Data API v3”)

8

  1. In the dropdown, select “YouTube Data API v3”, then select “User Data”, and click Next

9

  1. Under “Oauth Consent Screen”, fill out the required fields with some name, select your email, and enter an email below too. It doesn’t really matter what you put here. Then click “Save and Continue”

10

  1. Click “Add or Remove Scopes”, then find the one that says “…/auth/youtube.force-ssl”, click the check box, then at the bottom click “Update”. Then click “Save and Continue”

11 1
11 2

  1. Under “Oauth Client ID”, just select ‘Desktop App’. You can set a name or not. Then click “create”.

12

  1. Now click “Download” to download the credentials json file. Rename it to client_secrets.json and save it into the same directory as the python script. Then click done.

13
13 2

  1. When trying to log in you may get a “403 Access_Denied” error. If so, you need to add yourself as an authorized user. On the left menu, go to APIs & Services > Oauth Consent Screen > Under Test Users, Click “Add Users”. On the pop out window, type in your same Google/channel account email into the box and hit Save.

14

14 2

  1. Now you should be able to run the python script, and it will ask you to log in.

GitHub

View Github