From ef20655eaff00893fba7a55da233edbc22588208 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 2 Jun 2022 14:54:17 +0100 Subject: [PATCH] Tidying --- filters.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/filters.py b/filters.py index 244e990a7..dd97ab1be 100644 --- a/filters.py +++ b/filters.py @@ -100,12 +100,12 @@ def remove_global_filter(base_dir: str, words: str) -> bool: def _is_twitter_post(content: str) -> bool: """Returns true if the given post content is a retweet or twitter crosspost """ - if '/twitter.' in content or \ - '/nitter.' in content or \ - '@twitter.' in content: - return True - if '>RT <' in content: - return True + features = ( + '/twitter.', '/nitter.', '@twitter.', '>RT <', '_tw<' + ) + for feat in features: + if feat in content: + return True return False