[vsco] improve 'm3u8' handling

This commit is contained in:
Mike Fährmann
2025-02-12 20:44:43 +01:00
parent f1f27eb2ab
commit 6420210b0f

View File

@@ -38,9 +38,7 @@ class VscoExtractor(Extractor):
if img["is_video"]: if img["is_video"]:
if not videos: if not videos:
continue continue
url = img["video_url"] url = text.ensure_http_scheme(img["video_url"])
if not url.startswith("ytdl:"):
url = "https://" + url
else: else:
base = img["responsive_url"].partition("/")[2] base = img["responsive_url"].partition("/")[2]
cdn, _, path = base.partition("/") cdn, _, path = base.partition("/")
@@ -66,6 +64,7 @@ class VscoExtractor(Extractor):
"description": img.get("description") or "", "description": img.get("description") or "",
}) })
if data["extension"] == "m3u8": if data["extension"] == "m3u8":
url = "ytdl:" + url
data["_ytdl_manifest"] = "hls" data["_ytdl_manifest"] = "hls"
data["extension"] = "mp4" data["extension"] = "mp4"
yield Message.Url, url, data yield Message.Url, url, data