[twitter] fix potential 'UnboundLocalError' (#7932)

this happens with Tweets containing both images and video
when 'videos' are disabled.
This commit is contained in:
Mike Fährmann
2025-07-30 16:11:38 +02:00
parent e5c91d33ec
commit 3b93184997
2 changed files with 23 additions and 0 deletions

View File

@@ -217,6 +217,8 @@ class TwitterExtractor(Extractor):
"duration": video_info.get(
"duration_millis", 0) / 1000,
}
else:
continue
elif "media_url_https" in media:
url = media["media_url_https"]
if url[-4] == ".":