Add id_str for media: Fixes #283

This commit is contained in:
Dylan
2025-09-10 17:29:15 +01:00
parent 7a97adcf43
commit 1bc50830f5
4 changed files with 19 additions and 12 deletions

View File

@@ -84,6 +84,7 @@ def getApiResponse(tweet,include_txt=False,include_rtf=False):
extendedInfo["duration_millis"] = 0
extendedInfo["thumbnail_url"] = i["media_url_https"]
extendedInfo["altText"] = altText
extendedInfo["id_str"] = i["id_str"]
media_extended.append(extendedInfo)
else:
media.append(i["media_url_https"])
@@ -95,6 +96,7 @@ def getApiResponse(tweet,include_txt=False,include_rtf=False):
extendedInfo["type"] = "image"
extendedInfo["size"] = {"width":i["original_info"]["width"],"height":i["original_info"]["height"]}
extendedInfo["thumbnail_url"] = i["media_url_https"]
extendedInfo["id_str"] = i["id_str"]
media_extended.append(extendedInfo)
if "hashtags" in tweetL["entities"]: