Commit 7032232
Changed files (1)
src
preview
src/preview/twitter.py
@@ -354,7 +354,7 @@ async def get_tweet_info_via_fxtwitter(url: str = "", handle: str = "", post_id:
info = {"handle": glom(data, "author.screen_name", default=handle), "post_id": data.get("id", post_id)}
media = glom(data, Coalesce("media.all", "image_urls"), default=[])
for x in media:
- if x.get("type", "") == "video" and "mp4" not in x.get("format", ""): # this is a m3u8 url, choose mp4 instead
+ if x.get("type", "") == "video": # this is a m3u8 url, choose mp4 instead
m3u8_url = x.get("url", "")
mp4_url = ""
if variants := [x for x in x.get("variants", []) if "mp4" in x.get("content_type", "")]: