From 3d4bdf36dc96cc876c1fd36ee725e35081c71fbc Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Wed, 12 Feb 2020 19:45:26 +0100 Subject: [PATCH 1/2] Add ssa to blacklist --- connectors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectors.py b/connectors.py index f3df991..6aa0b7a 100644 --- a/connectors.py +++ b/connectors.py @@ -79,7 +79,7 @@ ConnectorCache = Cache() class Connector(ABC): - blacklist_words = ['Chris44', 'Vol.', '[zza]'] + blacklist_words = ['Chris44', 'Vol.', '[zza]', '.ssa'] @property @abstractmethod From af9b3995bf701e83f598fec085308ca1014bbc97 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Fri, 14 Feb 2020 15:19:51 +0100 Subject: [PATCH 2/2] Fix lower blacklist --- connectors.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/connectors.py b/connectors.py index 6aa0b7a..cf58e64 100644 --- a/connectors.py +++ b/connectors.py @@ -248,7 +248,7 @@ class Nyaa(Connector): url = urls[0] has_comment = False - if any(word in url.string for word in self.blacklist_words): + if any(word.lower() in url.string.lower() for word in self.blacklist_words): continue valid_trs = valid_trs + 1 @@ -315,7 +315,7 @@ class Pantsu(Connector): url = tds[1].a url_safe = ''.join(url.strings) - if any(word in url_safe for word in self.blacklist_words): + if any(word.lower() in url_safe.lower() for word in self.blacklist_words): continue valid_trs = valid_trs + 1 @@ -401,7 +401,7 @@ class YggTorrent(Connector): if check_downloads or check_seeds: url = tds[1].a - if any(word in url.string for word in self.blacklist_words): + if any(word.lower() in url.string.lower() for word in self.blacklist_words): continue valid_trs = valid_trs + 1