Skip to content

Commit 3ebe12f

Browse files
Fixed retweets tetx
1 parent 0e4faf8 commit 3ebe12f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/util/parse_tweet.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ def parse_tweet(tweet: dict, update_tweet_id: bool = False):
6969
is_long_tweet = False
7070

7171
## TODO: split the below logic up into functions
72+
print(tweet)
73+
print()
7274

7375
# To be able to get the tweet and the reply
7476
if "items" in tweet.keys():
@@ -210,8 +212,8 @@ def parse_tweet(tweet: dict, update_tweet_id: bool = False):
210212

211213
if retweeted_status_result and replied_tweet:
212214
e_title = f"{util.vars.custom_emojis['retweet']} {user_name} retweeted {r_user_name}"
213-
# Remove the "RT @username: " from the text
214-
text = re.sub(r"^RT @\w+: ", "", text)
215+
# Use the full retweeted text (otherwise the tweet text is cut off)
216+
text = r_text
215217

216218
media += r_media
217219
media_types += r_media_types

0 commit comments

Comments
 (0)