Skip to content

Commit

Permalink
Apply original image quality as default for twitter
Browse files Browse the repository at this point in the history
  • Loading branch information
aturret committed Jun 30, 2024
1 parent 0c9f4e4 commit e650586
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/services/twitter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"<img src='{media['media_url_https']}'/>"
] += f"<img src='{photo_url}'/>"
tweet_info["media_files"].append(
MediaFile(
media_type="image",
url=media["media_url_https"],
url=photo_url,
caption="",
)
)
Expand Down

0 comments on commit e650586

Please sign in to comment.