From 1fe850ae595e0aa7c0a1678c8730a2ebc866bdbe Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 22 Jun 2024 20:40:37 +0100 Subject: [PATCH] Don't cache tweet data w/ txt/rtf for now --- twitfix.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/twitfix.py b/twitfix.py index f97370f..0282a13 100644 --- a/twitfix.py +++ b/twitfix.py @@ -114,7 +114,7 @@ def oembedend(): def getTweetData(twitter_url,include_txt="false",include_rtf="false"): cachedVNF = getVnfFromLinkCache(twitter_url) - if cachedVNF is not None: + if cachedVNF is not None and include_txt == "false" and include_rtf == "false": return cachedVNF try: @@ -134,7 +134,8 @@ def getTweetData(twitter_url,include_txt="false",include_rtf="false"): tweetData = getApiResponse(rawTweetData,include_txt,include_rtf) if tweetData is None: return None - addVnfToLinkCache(twitter_url,tweetData) + if include_txt == "false" and include_rtf == "false": + addVnfToLinkCache(twitter_url,tweetData) return tweetData def determineEmbedTweet(tweetData):