diff --git a/requirements.txt b/requirements.txt index 0155bbb..83b08b8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ yahoo-fin==0.8.9.1 numpy==1.26.4 -yfinance==0.2.40 +yfinance==0.2.41 pycoingecko==3.1.0 pandas==2.2.2 requests==2.32.3 @@ -8,9 +8,9 @@ PyYAML==6.0.1 tradingview-ta==3.3.0 aiohttp==3.9.5 asyncpraw==7.7.1 -ccxt==4.3.65 -transformers==4.41.1 -matplotlib==3.9.0 +ccxt==4.3.68 +transformers==4.43.3 +matplotlib==3.9.1 scipy==1.14.0 brotli==1.1.0 py-cord==2.6.0 @@ -19,4 +19,5 @@ tls-client==1.0.1 uncurl==0.0.11 yahooquery==2.3.7 nltk==3.8.1 -timm==1.0.7 \ No newline at end of file +timm==1.0.8 +seaborn==0.13.2 \ No newline at end of file diff --git a/src/util/parse_tweet.py b/src/util/parse_tweet.py index bad70ab..573860a 100644 --- a/src/util/parse_tweet.py +++ b/src/util/parse_tweet.py @@ -203,18 +203,30 @@ def parse_tweet(tweet: dict, update_tweet_id: bool = False): hashtags += r_hashtags if reply and replied_tweet: - e_title = f"{util.vars.custom_emojis['reply']} {user_name} replied to {r_user_name}" + if "reply" in util.vars.custom_emojis: + e_title = f"{util.vars.custom_emojis['reply']} {user_name} replied to {r_user_name}" + else: + e_title = f"{user_name} replied to {r_user_name}" + text = "\n".join(map(lambda line: "> " + line, text.split("\n"))) text = f"> [@{r_user_screen_name}](https://twitter.com/{r_user_screen_name}):\n{text}\n\n{r_text}" # Add text on top if quoted_status_result and replied_tweet: - e_title = f"{util.vars.custom_emojis['quote_tweet']} {user_name} quote tweeted {r_user_name}" + if "quote_tweet" in util.vars.custom_emojis: + e_title = f"{util.vars.custom_emojis['quote_tweet']} {user_name} quote tweeted {r_user_name}" + else: + e_title = f"{user_name} quote tweeted {r_user_name}" + q_text = "\n".join(map(lambda line: "> " + line, r_text.split("\n"))) text = f"{text}\n\n> [@{r_user_screen_name}](https://twitter.com/{r_user_screen_name}):\n{q_text}" if retweeted_status_result and replied_tweet: - e_title = f"{util.vars.custom_emojis['retweet']} {user_name} retweeted {r_user_name}" + if "retweet" in util.vars.custom_emojis: + e_title = f"{util.vars.custom_emojis['retweet']} {user_name} retweeted {r_user_name}" + else: + e_title = f"{user_name} retweeted {r_user_name}" + # Use the full retweeted text (otherwise the tweet text is cut off) text = r_text