Skip to content

Commit

Permalink
[behance] handle videos without 'renditions' (#4523)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Sep 12, 2023
1 parent ae5e049 commit 32da3c7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gallery_dl/extractor/behance.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,13 @@ def get_images(self, data):
append((url, module))

elif mtype == "VideoModule":
renditions = module["videoData"]["renditions"]
try:
renditions = module["videoData"]["renditions"]
except Exception:
self.log.warning("No download URLs for video %s",
module.get("id") or "???")
continue

try:
url = [
r["url"] for r in renditions
Expand All @@ -186,6 +192,7 @@ def get_images(self, data):
except Exception as exc:
self.log.debug("%s: %s", exc.__class__.__name__, exc)
url = "ytdl:" + renditions[-1]["url"]

append((url, module))

elif mtype == "MediaCollectionModule":
Expand Down

0 comments on commit 32da3c7

Please sign in to comment.