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:
parent
1c68b7df01
commit
2dcfb012ea
@ -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)
|
||||
|
||||
|
@ -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"),
|
||||
|
Loading…
Reference in New Issue
Block a user