diff --git a/filters.py b/filters.py index d471481ce..bce3cf468 100644 --- a/filters.py +++ b/filters.py @@ -106,7 +106,7 @@ def _is_twitter_post(content: str) -> bool: """ features = ( '/twitter.', '/nitter.', '@twitter.', '@nitter.', - '>RT <', '_tw<', '_tw@', 'tweet', 'Tweet' + '>RT <', '_tw<', '_tw@', 'tweet', 'Tweet', '🐦🔗' ) for feat in features: if feat in content: diff --git a/inbox.py b/inbox.py index 998ee2870..b4ba1c3a0 100644 --- a/inbox.py +++ b/inbox.py @@ -2578,13 +2578,13 @@ def populate_replies(base_dir: str, http_prefix: str, domain: str, def _estimate_number_of_mentions(content: str) -> int: """Returns a rough estimate of the number of mentions """ - return int(content.count('@') / 2) + return content.count('>@<') def _estimate_number_of_emoji(content: str) -> int: """Returns a rough estimate of the number of emoji """ - return int(content.count(':') / 2) + return content.count(' :') def _valid_post_content(base_dir: str, nickname: str, domain: str,