Skip to content

Commit

Permalink
[behance] unescape embed URLs (mikf#4742)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Oct 30, 2023
1 parent ca1d5c2 commit fd8f58a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion gallery_dl/extractor/behance.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ def get_images(self, data):
elif mtype == "EmbedModule":
embed = module.get("originalEmbed") or module.get("fluidEmbed")
if embed:
append(("ytdl:" + text.extr(embed, 'src="', '"'), module))
embed = text.unescape(text.extr(embed, 'src="', '"'))
append(("ytdl:" + embed, module))

return result

Expand Down
6 changes: 4 additions & 2 deletions test/results/behance.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
"#url" : "https://www.behance.net/gallery/17386197/A-Short-Story",
"#category": ("", "behance", "gallery"),
"#class" : behance.BehanceGalleryExtractor,
"#count" : 2,
"#sha1_url": "ab79bd3bef8d3ae48e6ac74fd995c1dfaec1b7d2",
"#urls" : (
"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,
"name" : r"re:\"Hi\". A short story about the important things ",
Expand Down

0 comments on commit fd8f58a

Please sign in to comment.