mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[pinterest] support 'story_pin_music_block' blocks (#6421)
This commit is contained in:
parent
0b3ddd01af
commit
a9a9f3a180
@ -122,6 +122,11 @@ class PinterestExtractor(Extractor):
|
||||
media = self._extract_video(video)
|
||||
media["media_id"] = video.get("id") or ""
|
||||
|
||||
elif type == "story_pin_music_block":
|
||||
media = block["audio"]
|
||||
media["url"] = media["audio_url"]
|
||||
media["media_id"] = media.get("id") or ""
|
||||
|
||||
elif type == "story_pin_paragraph_block":
|
||||
media = {"url": "text:" + block["text"],
|
||||
"extension": "txt",
|
||||
|
@ -49,6 +49,16 @@ __tests__ = (
|
||||
"_ytdl_manifest": "hls",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://www.pinterest.com/pin/606508274845593025/",
|
||||
"#comment" : "story pin with audio (#6188)",
|
||||
"#class" : pinterest.PinterestPinExtractor,
|
||||
"#range" : "2",
|
||||
"#urls" : "https://v1.pinimg.com/audios/mp3/5d/37/74/5d37749bde03855c1292f8869c8d9387.mp3",
|
||||
|
||||
"extension": "mp3",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jp.pinterest.com/pin/851532242064221228/",
|
||||
"#comment" : "story pin with text",
|
||||
|
Loading…
Reference in New Issue
Block a user