[vsco] improve 'm3u8' handling
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user