From e6505869bdaf2327da6f3413c22331ab838e62c2 Mon Sep 17 00:00:00 2001 From: aturret Date: Sun, 30 Jun 2024 01:03:51 -0400 Subject: [PATCH] Apply original image quality as default for twitter --- app/services/twitter/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/services/twitter/__init__.py b/app/services/twitter/__init__.py index d48c716..6238733 100644 --- a/app/services/twitter/__init__.py +++ b/app/services/twitter/__init__.py @@ -169,13 +169,14 @@ def parse_single_tweet_Twitter135(tweet: Dict, retweeted=False) -> Dict: if tweet["media"]: for media in tweet["media"]: if media["type"] == "photo": + photo_url = media["media_url_https"] + "?name=orig" tweet_info[ "content_group" - ] += f"" + ] += f"" tweet_info["media_files"].append( MediaFile( media_type="image", - url=media["media_url_https"], + url=photo_url, caption="", ) )