diff --git a/gallery_dl/extractor/pinterest.py b/gallery_dl/extractor/pinterest.py index 499c579d..2f0d355d 100644 --- a/gallery_dl/extractor/pinterest.py +++ b/gallery_dl/extractor/pinterest.py @@ -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", diff --git a/test/results/pinterest.py b/test/results/pinterest.py index 8436c4aa..3ab5ebb3 100644 --- a/test/results/pinterest.py +++ b/test/results/pinterest.py @@ -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",