mirror of https://gitlab.com/bashrc2/epicyon
Merge branch 'main' of gitlab.com:bashrc2/epicyon
commit
59a273f420
|
|
@ -106,7 +106,7 @@ def _is_twitter_post(content: str) -> bool:
|
||||||
"""
|
"""
|
||||||
features = (
|
features = (
|
||||||
'/twitter.', '/nitter.', '@twitter.', '@nitter.',
|
'/twitter.', '/nitter.', '@twitter.', '@nitter.',
|
||||||
'>RT <', '_tw<', '_tw@', 'tweet', 'Tweet'
|
'>RT <', '_tw<', '_tw@', 'tweet', 'Tweet', '🐦🔗'
|
||||||
)
|
)
|
||||||
for feat in features:
|
for feat in features:
|
||||||
if feat in content:
|
if feat in content:
|
||||||
|
|
|
||||||
4
inbox.py
4
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:
|
def _estimate_number_of_mentions(content: str) -> int:
|
||||||
"""Returns a rough estimate of the number of mentions
|
"""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:
|
def _estimate_number_of_emoji(content: str) -> int:
|
||||||
"""Returns a rough estimate of the number of emoji
|
"""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,
|
def _valid_post_content(base_dir: str, nickname: str, domain: str,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue