From ef070af10a65c05d8c62549941a90210167f6b6b Mon Sep 17 00:00:00 2001 From: ThioJoe <12518330+ThioJoe@users.noreply.github.com> Date: Mon, 7 Feb 2022 18:32:30 -0700 Subject: [PATCH] Fix ValueError crash scanning spam threads #596 - Would throw message: Error Message: list.remove(x): x not in list Also updated filters --- Scripts/operations.py | 6 ++++-- Scripts/prepare_modes.py | 6 +++--- YTSpammerPurge.py | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Scripts/operations.py b/Scripts/operations.py index 6240c664..76dc3230 100644 --- a/Scripts/operations.py +++ b/Scripts/operations.py @@ -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 # ------------------------------------------------------------------------------- diff --git a/Scripts/prepare_modes.py b/Scripts/prepare_modes.py index e93aa55f..1091e877 100644 --- a/Scripts/prepare_modes.py +++ b/Scripts/prepare_modes.py @@ -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%_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^?c>', b'Z*CxTWo%_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', 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`hCbRcTAWc~yP*P7uNlZl'] + textExactBlackWords_Raw = [b'Z*6BRAZ2)AV{~kJAa`hCbRcOUZe?X;Wn=', b'Z*6BRAZ2)AV{~kJAa`hCbRc%ZSa$$35EFf)pAY*TCbY*UIAZc>', b'X>%ZFVRB+&XJsrPZFwMLZ*FvDZge1Na{', b'Z*CwVX8'] + textUpLowBlackWords_Raw = [b'O<5pAPfk=tPE;UCQv', b'Ngz!@OGO}8L0KR|MO0KpQXoT5PETAWc~yP*P7uNlZl', b'Z*CwVM*'] # General Settings unicodeCategoriesStrip = ["Mn", "Cc", "Cf", "Cs", "Co", "Cn"] # Categories of unicode characters to strip during normalization diff --git a/YTSpammerPurge.py b/YTSpammerPurge.py index 3901bfc8..9ed31f7a 100644 --- a/YTSpammerPurge.py +++ b/YTSpammerPurge.py @@ -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 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#