Skip to content

Commit

Permalink
Fix ValueError crash scanning spam threads
Browse files Browse the repository at this point in the history
#596 - Would throw message:
Error Message: list.remove(x): x not in list

Also updated filters
  • Loading branch information
ThioJoe committed Feb 8, 2022
1 parent e11d526 commit ef070af
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Scripts/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,10 @@ def remove_ignore(nameList):
for word in ignoreList:
if word in n:
removeList.append(n)
for item in removeList:
nameList.remove(item)
if removeList:
for item in removeList:
if item in nameList:
nameList.remove(item)
return nameList
# -------------------------------------------------------------------------------

Expand Down
6 changes: 3 additions & 3 deletions Scripts/prepare_modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,13 @@ def prepare_filter_mode_smart(scanMode, config, miscData, sensitive=False):
# General Spammer Criteria
#usernameBlackChars = ""
spamGenEmoji_Raw = b'@Sl-~@Sl-};+UQApOJ|0pOJ~;q_yw3kMN(AyyC2e@3@cRnVj&SlB@'
usernameBlackWords_Raw = [b'aA|ICWn^M`', b'aA|ICWn>^?c>', b'Z*CxTWo%_<a$#)', b'c4=WCbY*O1XL4a}', b'Z*CxIZgX^DXL4a}', b'Z*CxIX8', b'V`yb#YanfTAY*7@', b'b7f^9ZFwMLXkh', b'c4>2IbRcbcAY*7@', b'X>N0LVP|q-Z8`', b'Z*CxIZgX^D', b'Z*CxIZgX^DAZK!6Z2', b'c4=WCX>N0LVP|q-Z2', b'b9G`gb9G_', b'b9G`MG$3<zVg', b'Z*CxMc_3qGVE', b'XKx^MZy;@XAY*7@', b'X(w$UY-ML@bRcteVq$4-X8', b'W^!d^AZKZ2bN']
usernameBlackWords_Raw = [b'aA|ICWn^M`', b'aA|ICWn>^?c>', b'Z*CxTWo%_<a$#)', b'c4=WCbY*O1XL4a}', b'Z*CxIZgX^DXL4a}', b'Z*CxIX8', b'V`yb#YanfTAY*7@', b'b7f^9ZFwMLXkh', b'c4>2IbRcbcAY*7@', b'X>N0LVP|q-Z8`', b'Z*CxIZgX^D', b'Z*CxIZgX^DAZK!6Z2', b'c4=WCX>N0LVP|q-Z2', b'b9G`gb9G_', b'b9G`MG$3<zVg', b'Z*CxMc_3qGVE', b'XKx^MZy;@XAY*7@', b'X(w$UY-ML@bRcteVq$4-X8', b'W^!d^AZKZ2bN', b'WN&UKbRcqNVPqg}c>', b'Kxb`XX>2ZIZ*2']
usernameNovidBlackWords_Raw = [b'cWHEJATS_yX=D', b'cWHEJAZ~9Uc4=e', b'cWHEJZ*_DaVQzUKc4=e']
usernameObfuBlackWords_Raw = [b'c4Bp7YjX', b'b|7MPV{3B', b'a&KaFcm', b'a&KaFV{3B']
usernameRedWords = ["whatsapp", "telegram"]
textObfuBlackWords = ['telegram']
textExactBlackWords_Raw = [b'Z*6BRAZ2)AV{~kJAa`hCbRcOUZe?X;Wn=', b'Z*6BRAZ2)AV{~kJAa`hCbRc<ebs%nKWn^V!', b'Z*6BRAZ2)AV{~kJAa`hCbRckLZ*Xj7AZ}%4WMyO', b'ZDnU+ZaN?$Xm50MWpW|', b'M`3zpIv^rJZDD$4WFi']
textUpLowBlackWords_Raw = [b'O<5pAPfk=tPE;UCQv', b'Ngz!@OGO}8L0KR|MO0KpQXoT5PE<usQ~', b'O<5pTNkm0YQy@W7MF', b'Qbj>TAWc~yP*P7uNlZl']
textExactBlackWords_Raw = [b'Z*6BRAZ2)AV{~kJAa`hCbRcOUZe?X;Wn=', b'Z*6BRAZ2)AV{~kJAa`hCbRc<ebs%nKWn^V!', b'Z*6BRAZ2)AV{~kJAa`hCbRckLZ*Xj7AZ}%4WMyO', b'ZDnU+ZaN?$Xm50MWpW|', b'M`3zpIv^rJZDD$4WFi', b'X>%ZSa$$35EFf)pAY*TCbY*UIAZc>', b'X>%ZFVRB+&XJsrPZFwMLZ*FvDZge1Na{', b'Z*CwVX8']
textUpLowBlackWords_Raw = [b'O<5pAPfk=tPE;UCQv', b'Ngz!@OGO}8L0KR|MO0KpQXoT5PE<usQ~', b'O<5pTNkm0YQy@W7MF', b'Qbj>TAWc~yP*P7uNlZl', b'Z*CwVM*']

# General Settings
unicodeCategoriesStrip = ["Mn", "Cc", "Cf", "Cs", "Co", "Cn"] # Categories of unicode characters to strip during normalization
Expand Down
2 changes: 1 addition & 1 deletion YTSpammerPurge.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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.15.0"
version = "2.15.1"
configVersion = 26
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

Expand Down

0 comments on commit ef070af

Please sign in to comment.