[instagram] fix 'extensiob' of apparent '.webp' files (#6541)

Many '.webp' download URLs are actually '.jpg' files, which usually get
renamed by 'http.adjust-extensions'
This commit is contained in:
Mike Fährmann
2024-11-28 15:17:32 +01:00
parent 7c7b8a25c3
commit 5cc9ca7199

View File

@@ -101,7 +101,10 @@ class InstagramExtractor(Extractor):
continue
url = file["display_url"]
yield Message.Url, url, text.nameext_from_url(url, file)
text.nameext_from_url(url, file)
if file["extension"] == "webp" and "stp=dst-jpg" in url:
file["extension"] = "jpg"
yield Message.Url, url, file
def metadata(self):
return ()