Merge branch 'main' of gitlab.com:bashrc2/epicyon

merge-requests/30/head
Bob Mottram 2022-07-17 17:20:59 +01:00
commit 59a273f420
2 changed files with 3 additions and 3 deletions

View File

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

View File

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