Skip to content

Commit 4fb2e2d

Browse files
refactored
1 parent dd64873 commit 4fb2e2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tasks/schedulers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ async def do_create_tweet(self, article: ArticleData) -> dict[str, str]:
134134
# Create the tweet text with hashtags
135135
_title: str = "Financial & Business News API"
136136
_crop_len: int = self._max_status_length - len(_title) - 6 - len(hashtags)
137-
tweet_body = f"{article.sentiment.article_tldr}" if article.sentiment and article.sentiment.article_tldr else article.title
137+
tweet_body = f"{article.sentiment.article_tldr[:_crop_len]}" if article.sentiment and article.sentiment.article_tldr else article.title
138138

139139
tweet_text = f"{_title}\n-{tweet_body}...\n{hashtags}"
140140

0 commit comments

Comments
 (0)