mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
fba106842f
commit
ef20655eaf
12
filters.py
12
filters.py
|
@ -100,12 +100,12 @@ def remove_global_filter(base_dir: str, words: str) -> bool:
|
||||||
def _is_twitter_post(content: str) -> bool:
|
def _is_twitter_post(content: str) -> bool:
|
||||||
"""Returns true if the given post content is a retweet or twitter crosspost
|
"""Returns true if the given post content is a retweet or twitter crosspost
|
||||||
"""
|
"""
|
||||||
if '/twitter.' in content or \
|
features = (
|
||||||
'/nitter.' in content or \
|
'/twitter.', '/nitter.', '@twitter.', '>RT <', '_tw<'
|
||||||
'@twitter.' in content:
|
)
|
||||||
return True
|
for feat in features:
|
||||||
if '>RT <' in content:
|
if feat in content:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue