Skip to content

Commit

Permalink
[behance] support 'text' modules (#4799)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Nov 17, 2023
1 parent ea78f67 commit 6a753d9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gallery_dl/extractor/behance.py
Expand Up @@ -97,7 +97,8 @@ def items(self):
yield Message.Directory, data
for data["num"], (url, module) in enumerate(imgs, 1):
data["module"] = module
data["extension"] = text.ext_from_url(url)
data["extension"] = (module.get("extension") or
text.ext_from_url(url))
yield Message.Url, url, data

def get_gallery_data(self):
Expand Down Expand Up @@ -171,8 +172,13 @@ def get_images(self, data):
embed = module.get("originalEmbed") or module.get("fluidEmbed")
if embed:
embed = text.unescape(text.extr(embed, 'src="', '"'))
module["extension"] = "mp4"
append(("ytdl:" + embed, module))

elif mtype == "TextModule":
module["extension"] = "txt"
append(("text:" + module["text"], module))

return result


Expand Down

0 comments on commit 6a753d9

Please sign in to comment.