From d0cc12ef5c223c91fc5eba3b3517b406a5b45926 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Mon, 4 Jan 2021 11:14:55 -0600 Subject: [PATCH] Added basic tweet rendering --- src/sessions/twitter/compose.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sessions/twitter/compose.py b/src/sessions/twitter/compose.py index 21496d2f..a1019bc6 100644 --- a/src/sessions/twitter/compose.py +++ b/src/sessions/twitter/compose.py @@ -39,7 +39,7 @@ chars = "abcdefghijklmnopqrstuvwxyz" def compose_tweet(tweet, db, relative_times, show_screen_names=False, session=None): """ It receives a tweet and returns a list with the user, text for the tweet or message, date and the client where user is.""" if system == "Windows": - original_date = arrow.get(tweet.created_at, "ddd MMM DD H:m:s Z YYYY", locale="en") + original_date = arrow.get(tweet.created_at, locale="en") if relative_times == True: ts = original_date.humanize(locale=languageHandler.curLang[:2]) else: @@ -138,7 +138,7 @@ def compose_quoted_tweet(quoted_tweet, original_tweet, show_screen_names=False, original_text = StripChars(original_tweet.text) quoted_tweet.message = _(u"{0}. Quoted tweet from @{1}: {2}").format( text, original_user, original_text) quoted_tweet = tweets.clear_url(quoted_tweet) - quoted_tweet.entities.urls.extend(original_tweet.entities.urls) + quoted_tweet.entities["urls"].extend(original_tweet.entities["urls"]) return quoted_tweet def compose_followers_list(tweet, db, relative_times=True, show_screen_names=False, session=None):