main
Bob Mottram 2022-06-02 14:54:17 +01:00
parent fba106842f
commit ef20655eaf
1 changed files with 6 additions and 6 deletions

View File

@ -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