1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 04:02:32 +01:00

[patreon] download 'm3u8' manifests with ytdl

This commit is contained in:
Mike Fährmann 2024-01-12 02:33:27 +01:00
parent 1c68b7df01
commit 2dcfb012ea
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 13 additions and 1 deletions

View File

@ -52,7 +52,11 @@ class PatreonExtractor(Extractor):
post["hash"] = fhash
post["type"] = kind
post["num"] += 1
yield Message.Url, url, text.nameext_from_url(name, post)
text.nameext_from_url(name, post)
if text.ext_from_url(url) == "m3u8":
url = "ytdl:" + url
post["extension"] = "mp4"
yield Message.Url, url, post
else:
self.log.debug("skipping %s (%s %s)", url, fhash, kind)

View File

@ -103,6 +103,14 @@ __tests__ = (
"tags": ["AWMedia"],
},
{
"#url" : "https://www.patreon.com/posts/meu8-94714289",
"#category": ("", "patreon", "post"),
"#class" : patreon.PatreonPostExtractor,
"#range" : "2",
"#pattern" : r"ytdl:https://stream\.mux\.com/NLrxTLdxyGStpOgapJAtB8uPGAaokEcj8YovML00y2DY\.m3u8\?token=ey.+",
},
{
"#url" : "https://www.patreon.com/posts/not-found-123",
"#category": ("", "patreon", "post"),