Giter VIP home page Giter VIP logo

youtube-spammer-purge's Introduction

YouTube Spammer Purge

What Is This? - Allows you to filter and search for spammer comments on your channel in many different ways AND delete 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 "YouTubeSpammerPurge.exe". NOTE: You may get a warning - See "Download & Windows Warning" section below for details.

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)
  • Scan comments on a single video, up to your most recent 5 videos or across your whole channel
  • 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. 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 ๐Ÿค”:

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

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

Updated Demo Video Screenshot Link

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

Demo 1 Video Screenshot Link

(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

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

Operating System Specific Instructions:

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 WalkThrough Here: https://www.youtube.com/watch?v=c6ebWvay8dE

  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.

youtube-spammer-purge's People

Contributors

acteam-ux avatar chxseh avatar eilon40 avatar flexagoon avatar georgewoodall82 avatar kendalldoescoding avatar malikidreeshasankhan avatar markviews avatar mdp43140 avatar snyk-bot avatar techstudent10 avatar theonlywayup avatar thiojoe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.