Skip to content

Commit

Permalink
Fix parse tweet bug
Browse files Browse the repository at this point in the history
close #605
  • Loading branch information
StephanAkkerman committed Jul 29, 2024
1 parent 956dee1 commit 8b4a698
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/util/parse_tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ def parse_tweet(tweet: dict, update_tweet_id: bool = False):
r_media_types,
) = replied_tweet

media += r_media
media_types += r_media_types
tickers += r_tickers
hashtags += r_hashtags

if reply and replied_tweet:
e_title = f"{util.vars.custom_emojis['reply']} {user_name} replied to {r_user_name}"
text = "\n".join(map(lambda line: "> " + line, text.split("\n")))
Expand All @@ -213,11 +218,6 @@ def parse_tweet(tweet: dict, update_tweet_id: bool = False):
# Use the full retweeted text (otherwise the tweet text is cut off)
text = r_text

media += r_media
media_types += r_media_types
tickers += r_tickers
hashtags += r_hashtags

# Replace & etc.
text = text.replace("&amp;", "&").replace("&gt;", ">").replace("&lt;", "<")

Expand Down

0 comments on commit 8b4a698

Please sign in to comment.