[behance] unescape embed URLs (#4742)

This commit is contained in:
Mike Fährmann
2023-10-30 13:37:09 +01:00
parent ca1d5c2c0c
commit fd8f58ad76
2 changed files with 6 additions and 3 deletions

View File

@@ -170,7 +170,8 @@ class BehanceGalleryExtractor(BehanceExtractor):
elif mtype == "EmbedModule": elif mtype == "EmbedModule":
embed = module.get("originalEmbed") or module.get("fluidEmbed") embed = module.get("originalEmbed") or module.get("fluidEmbed")
if embed: if embed:
append(("ytdl:" + text.extr(embed, 'src="', '"'), module)) embed = text.unescape(text.extr(embed, 'src="', '"'))
append(("ytdl:" + embed, module))
return result return result

View File

@@ -13,8 +13,10 @@ __tests__ = (
"#url" : "https://www.behance.net/gallery/17386197/A-Short-Story", "#url" : "https://www.behance.net/gallery/17386197/A-Short-Story",
"#category": ("", "behance", "gallery"), "#category": ("", "behance", "gallery"),
"#class" : behance.BehanceGalleryExtractor, "#class" : behance.BehanceGalleryExtractor,
"#count" : 2, "#urls" : (
"#sha1_url": "ab79bd3bef8d3ae48e6ac74fd995c1dfaec1b7d2", "ytdl:https://player.vimeo.com/video/97189640?title=0&byline=0&portrait=0&color=ffffff",
"https://mir-s3-cdn-cf.behance.net/project_modules/source/a5a12417386197.562bc055a107d.jpg",
),
"id" : 17386197, "id" : 17386197,
"name" : r"re:\"Hi\". A short story about the important things ", "name" : r"re:\"Hi\". A short story about the important things ",