Skip to content

Commit

Permalink
Update Script - Make username filter less sensitive
Browse files Browse the repository at this point in the history
Username filter was too sensitive and generated many fast positives with channels with short and simple names. Moved original behavior to 'sensitive' mode
  • Loading branch information
ThioJoe committed Dec 23, 2021
1 parent 40538e7 commit af2e969
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions YouTubeSpammerPurge.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
### IMPORTANT: 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 bug. You should inspect the code yourself.
version = "2.2.3"
version = "2.2.4"
configVersion = 10
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

Expand Down Expand Up @@ -569,7 +569,9 @@ def findOnlyObfuscated(regexExpression, originalWord, stringToSearch):
add_spam(commentID, videoID)
elif any(findOnlyObfuscated(expression[1], expression[0], combinedString) for expression in compiledRegexDict['blackAdWords']):
add_spam(commentID, videoID)
elif re.search(inputtedUsernameFilter['usernameConfuseRegex'], authorChannelName):
elif sensitive == True and re.search(inputtedUsernameFilter['usernameConfuseRegex'], authorChannelName):
add_spam(commentID, videoID)
elif sensitive == False and findOnlyObfuscated(inputtedUsernameFilter['usernameConfuseRegex'], miscData['channelOwnerName'], authorChannelName):
add_spam(commentID, videoID)
# Multi Criteria Tests
else:
Expand Down

0 comments on commit af2e969

Please sign in to comment.