How's it going guys,
I'm Joe,
and for the past two weeks
I've been working on something game changing,
which is why I haven't really been posting.
You guys have undoubtedly seen
the complete infestation of these scam comments on YouTube
that impersonate some creator and then leave a ton of replies
to every comment on a video telling people to contact them on WhatsApp or whatever.
I've been getting them for months, and God forbid
you make any kind of finance related content.
You'll just be inundated.
I mean, just look at this on Graham Stephan's latest video.
Every single comment has a reply from a spammer.
Same for this other channel, Alex Becker.
It's absurd.
Now I have, of course,
added elements of these messages to my spam filter over time,
but they keep coming back with ever more convoluted ways to get around them.
But if you're a creator, you might know that the most frustrating part about them
is that YouTube offers no way to delete them all at once.
Oh yes, there is a function to ban the user from commenting,
but it does not remove their previous comments, meaning that
if these spammers show up, you have to go through a list of comments
and delete every single one by hand, which takes multiple clicks each.
And there are usually hundreds of these, so it's takes forever.
But I have finally come up with the solution.
I handcrafted a program in Python using the Google API
to smash these spammers
even harder than you should smash the like button right now.
I'll show you in more detail in a minute how it works, but basically
you can literally just type in the video to scan the spammers Channel ID
and then sit back while the scammers work gets flushed away in seconds.
It deletes all their comments.
And yes, it is free and open source.
So if you hate these spammers as much as I do,
let your favorite creators
know about this program that I made, send this video, whatever.
Now, forgive me because first I'm going to rant for a minute.
So if you want to just get to the solution,
you can skip ahead with the timestamps.
But I just have to vent because based on my experience, YouTube
apparently does not give a single [censored] about scam accounts
that only leave comments but don't post scam videos or whatever.
I have reported every single one of these accounts that show up on my channel,
but not a single one was ever banned until I manually reached out
to creator support and reported them for impersonation and spamming.
In that case, YouTube will remove most of them after a couple of days
of getting back to me.
But really, it's hit or miss because if the channel name is too convoluted,
YouTube support will not remove it because I guess it doesn't
meet the threshold for impersonation.
Even though I also said, Hey, look at the comments they're leaving,
it's obvious, but they didn't remove it and to really drive the point home, here's
an example of a spam account where the scammer had changed
the profile picture and account name to impersonate another creator
in the time between when I reported them and when it was reviewed by YouTube.
So YouTube came back and said...
[TTS Voice] "for the rest of the channel that you reported we have confirmed that it didn't violate our community guidelines"
Meanwhile, I went
on the channel that the spammer account was now impersonating,
checked their most recent video, and that same account
that YouTube just confirmed didn't violate any guidelines
literally had left even more scam comments there too.
There were still up and Googling you look at them, apparently,
so I sent YouTube a direct link to one of the scam comments that was left
by the same account that I reported, which, by the way, is still there
and they come back and have the audacity to say...
[TTS Voice] "Our team actually checked these channels against our guidelines on impersonation and they confirmed that those channels didn't violate our Community Guidelines"
No, YouTube.
You didn't,
because if you had taken even one millisecond
to even look at the comments that this account was leaving,
anyone with even half a brain cell would immediately recognize it as a scammer.
What the hell?
Now YouTube employees, if you're watching, I'm
going to give you the benefit of the doubt and assume that maybe not enough
resources have been allocated to creating tools to deal with spam comments
as opposed to videos.
So if you are a higher up at YouTube, please for the love of God.
Implement some additional systems to deal with spam comments.
I know it's almost impossible to stop spammers permanently, but simply making it
so when you ban a user, all their comments disappear.
That would make it so much easier to handle these spammers.
OK, so now that I got that out of my system, let me get back to the good news.
Because YouTube was so useless in helping with this problem,
I basically pulled a Thanos moment and decided
to just make a tool myself to bulk delete these comments.
And that's what I did.
Seriously, YouTube, I was able to do this in like two weeks.
In a cave. With a box of scraps!
So I'll show you what this program does,
as well as how to get it set up to work with the YouTube API on your account
because it does take a bit of preparation, but it's just a Python script.
So all the source code is right on my GitHub page for the project.
Or if you want to open up the file, you can look at yourself and improve on it
and make your own version really whatever you want.
So let's head over to the computer and I'll show you everything.
All right, so let me show you this.
So basically, you can get the app from this page on GitHub.
I'll put the link in the description, of course, and then there are instructions
you will have to follow to get it set up I'll go over that afterwards and show you.
But basically, you can get it from going to the latest release on the release page.
The latest one will be right there,
and then you just go and download YouTube spammer exe.
Now, one thing to notice is because this app is new, it doesn't have a reputation.
Basically, it might warn you that it hasn't been commonly downloaded.
You can just download it by hitting Keep there
and then it might make you do that again.
Keep anyway, and then you'll download it.
And the same thing will probably happen in Windows when you run it.
You might see this pop up until it gets your reputation,
so you can simply unblock that by right
clicking, going down to properties where it says unblock.
You can check that hit OK, and then you should be able to run.
Another thing I got to point out is when you first run this,
you're not going to be able to because you do have to create an API key.
I'll explain that later in the video, but basically you're going to need to get
this one
file, client_secrets.Jason.
But I'm just going to post in here
now, but I'll show you how to get this yourself.
And then there's another one token.pickle that'll be generated automatically.
But anyway, this is the app.
I'll show you how it works now.
And then we go over that later, and this is it.
This is the icon I created for it.
And when you run it
and you're already logged in and everything, you will see this pop up.
So it says YouTubeSpammerPurge and then whatever version number, it's
got the GitHub page, and it's tells you a little bit about the purpose.
And what you can do is say, do you want to scan a single video
or your entire channel?
And what I actually did is I created a demonstration video
and asked my followers to leave a bunch of comments,
which I got way more common than I expected.
And I actually responded to a bunch.
So we can give myself as an example for deleting my own comments,
pretending I'm the spammer.
So like I said, you can choose either
to scan the entire channel or the single video.
So let's do an example
for the entire channel first and then it'll say, enter your Channel ID.
So in my case, my channel ID for this channel that I uploaded on
is going to be up here. It's this one that begins with UC.
You just paste that in there, and then it's going to ask you to scan
what maximum number of comments
this is only going to be the case if you're scanning the entire channel.
Because obviously,
if you have thousands of videos going back years
and you have hundreds of thousands of comments,
it's not going to be that great if you try to scan all of them.
So let's just say 1000.
And then the ID of the spammer.
So again, we could pretend that I'm the spammer,
so we'll go to my other channel and copy that, paste it into the program.
It's going to start scanning.
It'll tell you the status.
Top level comments scanned, replies scanned and how many found so far.
And then it'll go probably a little bit past the maximum because it queues them up
and the number of spam comments found.
It'll ask you if you want to also save them to a text file.
Let's say yes, and then I'll show you what that looks like.
So the text file is what it says right here.
And then when you go to display, it will actually add them to the text file.
And here they go.
Here's all those spam comments that have found.
These are the most recent within the most recent 1000 comments on my channel.
And you can see that
it says the name of the person that left the comment, the comment itself.
And then if you're scanning the entire channel, it'll show you what
the name of the video that was found on
and then also a direct link to the actual comment.
So I'll show you an example.
It's probably easier to click it if you go into the log file
this right here, it'll show you a list of just all the IDs of the spammer comments.
And then, for example, this link goes directly to one of them,
and you can see here's the highlighted reply of this particular comment.
And then what it'll ask you is if you want to actually delete
all these comments, I'm going to say no for now,
because we're going to do this when I scan the entire video,
so I'll hit no, or type in whatever, and it'll cancel it.
So let's run this again. And this time we're going to do single video.
I already have the video ID of that demo video right here.
It's going to ask you if the chosen video, it'll show the title right here.
Ask you if to correct you Type Y for yes, the channel
ID of the spammer, which is my channel and it's going to start going.
So there's about 4000 comments on this.
So I'll kind of skip ahead now.
Actually, I do need to point out that sometimes haven't figured out why yet.
It will just freeze and stop scanning.
If you see that it did this, you just have to close it and run it again.
But that shouldn't happen all the time.
All right. So we're going through it again.
Hopefully, it'll work this time and you can see it pretty much found them all.
It went through all of them,
and I left a whole bunch of reply comments before when I first uploaded the video.
So there's about 79 comments that have found
those are all going to be mine. List the text file.
Yes, we're going to want to do
that, created it right there, and it's going to now display all of them at once.
It's a lot
faster displayed on a single video, so we can now read through these again.
So blah blah blah spam.
These are the ones that I left just random, random comments.
Example comment again.
If we go into the text file and look at these,
we can go and find it,
and let's open this one so we can kind of keep track of it
so we can see now our highlighted reply, this should be gone after we go in
through and delete it.
So now let's pretend that we want to delete all of these comments that I left.
We're going to hit. Yes.
Type it in. Yes, exactly.
It's going to go through, delete them all, and then it will give a confirmation.
It'll actually confirm that they're deleted once it's done.
The more comments you have longer
this is going to take obviously, there's almost 80 here or so.
All right.
So it says they should be gone and it's going to verify that it went through.
Each dot is one verified comment, by the way.
And now you can see it says all spam comments should be gone.
So that should have worked.
So we can now go.
And right now we are highlighting this one,
and if we refresh, it should not show any more.
And there it is, it's gone.
So this was the one that was highlighted before,
and now it's just this other guy's comment.
And just for an example, we can do another one
with top level comments, not replies.
So this guy was helpful enough to leave a whole bunch of different random comments
so we can see there's a whole bunch here
that we can test and we'll remember that he was commenting above this "Wark" guy
and then below this guy , Naseem and Charl.
So we're gonna have to run it again.
So we're going to scan single video, get the ID from that, post it
in, and get the Channel ID of this guy.
Paste that, and it's going to go, and it pretty much found them
all right away because he was commenting pretty recently.
But we'll just let it continue through.
All right. So it just finished and he left 28 comments.
So it's now ready to display them.
Let's see what they look like. That was for the log file.
Enter to display....
and now we can look again.
So this is where you'd pretty much double check, OK, this is indeed
the correct spammer that I was looking for.
They left all spam comments and we can now type YES exactly.
If you don't type that in all caps and everything, it won't delete them
and then it'll go through and we can wait again.
There it goes through, it should be done, it's going to check them
and says success. They should be gone.
We can go back and check
if we refresh, they were right below this Charl and Naseem guy.
Sort by newest
and they're gone,
so here's Charl, Naseem, and all those spam comments from before
from that guy are no longer there, and that's how it works.
Alright so like I mentioned a second ago, if you just try to run this right
after downloading, you don't have the API key file.
So let me show you how to actually get that set up.
I do mention that there are instructions on the GitHub page,
so if you go to there and then scroll down,
there is instructions here, but I'll walk you through it anyway.
It's not really that difficult.
So what you have to do is go to
console.cloud.google.com.
And then it'll probably the first time give you a thing
that you have to agree to the terms
and then you probably
don't have any project, so it'll probably say select a project.
And then, if not, you still click this and just go to new project here.
And basically, we're going to create a project on your account that will tell
Google what permissions and stuff that the program is going to get.
Now you can literally call it whatever you want,
but it does have to be unique, I believe.
So we can just call it Spammer Deleter and then some numbers
after it because some people might use that as well.
And then we can just click create.
Then it'll take a second to create it, and then you can select Project.
And now you'll see at the top that this is selected.
Next, we need to enable the YouTube data API for the project.
So if this didn't pop out, you can just click navigation menu.
Hover over APIs and services and then go to library.
On this page, scroll down and click YouTube Data API.
If you're trying to scroll and it doesn't work.
Make sure you hover your mouse over the bottom half of the page
and then just click this box here, or you can search for it
and find it that way.
So YouTube Data API V3 and then click Enable.
So you give it a second, and it'll take you to this page.
If you ever need to get back to this page.
So, for example, let's say you're back at the main page where you can do is
go to navigation menu, click APIs and Services > dashboard.
Then if you scroll down, it'll list all the ones you have on this project
and you just click YouTube data API again and you're back here.
So we need to create credentials that's going to be the file.
So you click create credentials and then here just basically
follow these steps so you click YouTube Data API again.
We're going to do User Data, click next and don't click done yet.
We're still going through all these.
And so app name again, it doesn't really matter.
We can call it Spammer Deleter, and I don't think this one has to be unique.
And then for support
email, no one's going to be using this except for you, so it doesn't matter.
And then again, just put in whatever you want.
Click, save and continue.
Most of this is going to sound like it's assuming that other people
are going to be using the app, but they're not.
So then we click for scopes, it says optional.
But we do have to do this.
So add or remove scopes, it'll pop out this thing on the right and then click
next ten rows and just go over until you see the YouTube data API
one and under scope make sure it's the one that says youtube.force-ssl.
That's the one we need.
And then scroll down to the bottom, click Update.
And then now you should see it
under your sensitive scopes, and then we click Save and continue again.
And then for application type, just click desktop app.
It's the easiest one, and you can name that whatever you want, it doesn't matter.
So now it'll show you what's called the Client ID.
We don't need this, but what we will do is click download
and then this will actually download the file that we need.
So you actually want to rename this to client_secrets,
client_secrets.json .
And if you don't see an extension,
it doesn't say JSON, that should be fine if you don't have file extensions named.
It might just say client secrets,
but if you hover over it, it should still say type JSON file.
So that's fine.
Or you can double check by clicking view, and then file
name extensions, and then it should show the whole thing.
So then just copy this file and then put it wherever you have
the exe file or the Python script, if you're doing it that way
and just have it in the same folder.
And if you need to get back to the credentials again, like you click
done, then what you can do is back in the API services, so navigation bar
and then APIs and services, you just go to credentials
and then you can download it by clicking the download OAuth client file.
And then you click download
JSON, and that will download the same thing before
and also make sure you don't share Client I.D.
or client secret with anyone, I'm going to blur it out here,
don't share the file with anyone else, either.
So anyway, after you have the file in there,
when you double click the program, this time it should pop up a window
right away to have you log in and authorize the account.
So make sure you log in with the Google account that has your channel.
Click on the channel then.
Now, if it says access denied and you're definitely logging into the same account
that is the owner of the YouTube channel, you probably have to do one more step.
So what you do is close it out and then under the navigation menu,
go to APIs and services and then OAuth consent screen
and then go down to under test users.
Click Add Users.
Now you do not want to publish the app that would basically let other people
use this project.
It wouldn't grant access to your YouTube channel,
but it would let them take up your quota so you don't really want them to do that.
So you click Add users and then just add the account
email they were using again and then click Save.
And now we can try it again.
And there we go.
So it will say Google hasn't verified this app,
and then you click continue, and then you're going to have to grant
the project access.
And this is going to look scary because it says, see, edit personally,
delete your YouTube video rating.
It's like literally everything,
but it needs that permission to be able to delete the comments.
And remember, this is your project.
Spammer
Deleter is the thing that you created, so granting it access is not a problem.
You click Allow and then it says authentication flow is completed
and then now you'll notice that probably in the same exact window, it'll now
show the whole thing for running it.
And actually it will renew it and you'll see the token.pickle,
that's like the actual permission.
So next time you run it, you won't have to do this again.
It'll just remember it and load it right away.
All right, so there you have it.
I put a ton of work into this program because I basically had to learn along
the way.
So spread the word
so we can at least make it so spamming is no longer worth these scammers time.
So again, lightly tap the like button.
And if you want to subscribe,
also click the Bell to Enable Notifications
because I only post about twice a week tops
so you don't want them getting lost in the rest of your subscriptions.
If you want to keep watching, check out my previous video where I had a bit of fun
seeing what would happen if you delete the AppData and Users folders in windows.
You can check it out and see how broken things got by clicking that link
right there. So thanks so much for watching guys and I'll see you in the next one.