[patreon] download 'm3u8' manifests with ytdl
This commit is contained in:
@@ -52,7 +52,11 @@ class PatreonExtractor(Extractor):
|
|||||||
post["hash"] = fhash
|
post["hash"] = fhash
|
||||||
post["type"] = kind
|
post["type"] = kind
|
||||||
post["num"] += 1
|
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:
|
else:
|
||||||
self.log.debug("skipping %s (%s %s)", url, fhash, kind)
|
self.log.debug("skipping %s (%s %s)", url, fhash, kind)
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,14 @@ __tests__ = (
|
|||||||
"tags": ["AWMedia"],
|
"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",
|
"#url" : "https://www.patreon.com/posts/not-found-123",
|
||||||
"#category": ("", "patreon", "post"),
|
"#category": ("", "patreon", "post"),
|
||||||
|
|||||||
Reference in New Issue
Block a user