Package: yt-spam-purge
yt-spam-purgeEasily 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)Linux Setup InstructionsMacOS Setup Instructions(Windows installation not necessary if using exe file. But see how to set up required API keyon this page)Detailed Info & Documentation →Visit the wiki(Click Here)for more detailed writeups on the programFeatures15 Different Filtering MethodsAuto-Smart Mode (Recommended): Automatically detects multiple spammer techniquesSensitive-Smart Mode: More likely to catch elusive spammers, but with more false positivesScan by Channel ID: Enter a known spammer's channel link or ID directlyScan Usernamesfor: Individual special characters, individual strings, or using a custom Regex expressionScan Comment Text: (Same 3 options as above)Scan Usernames and Comment Textsimultaneously: (Same 3 options as above)ASCII Mode: Scan Usernames for non-ASCII special characters (three different sensitivities)4 Different Scanning ModesScan asingle videoScanRecent Videos(Up to 5)Scan recent comments acrossentire channel(all videos)Experimental: Scan acommunity postAutomatic deletion of all found comments (after confirmation), as well as the option to ban themOptions to instead Report spam comments or 'Hold For Review'Ability to create config file to skip pre-set optionsRich text log files'Recovery Mode' option to re-instate previously deleted commentsDisplays "match samples" after printing comments list to easily spot false positivesAbility to exclude selected authors before deletion / reportingPurposeRecently, 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 anblank dummy-google-accountwith nothing on it except a empty new channel. Then you can grantthatchannel permission to be a moderator, and use the app throughthe 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 thewiki page here.Usage Notes -READ THISTo 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-namedclient_secret.jsonand be placed in the same directory as this script.See Instructions Here.IF IT FREEZESwhile 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.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. ThereforeI 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.Requirementsyt-spam-purge requires Python 3.10 or above.To install Python 3.10, I recommend usingpyenv.# install pyenvgitclonehttps://github.com/pyenv/pyenv~/.pyenv# setup pyenv (you should also put these three lines in .bashrc or similar)exportPATH="${HOME}/.pyenv/bin:${PATH}"exportPYENV_ROOT="${HOME}/.pyenv"eval"$(pyenvinit-)"# install Python 3.10pyenvinstall3.10.0# make it available globallypyenvglobalsystem3.10.0InstallationWithpip:python3.10-mpipinstallyt-spam-purgeWithpipx:python3.10-mpipinstall--userpipx

pipxinstall--pythonpython3.10yt-spam-purge