[behance] handle videos without 'renditions' (#4523)

This commit is contained in:
Mike Fährmann
2023-09-12 20:53:35 +02:00
parent ae5e049c4f
commit 32da3c70d3

View File

@@ -177,7 +177,13 @@ class BehanceGalleryExtractor(BehanceExtractor):
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
@@ -186,6 +192,7 @@ class BehanceGalleryExtractor(BehanceExtractor):
except Exception as exc:
self.log.debug("%s: %s", exc.__class__.__name__, exc)
url = "ytdl:" + renditions[-1]["url"]
append((url, module))
elif mtype == "MediaCollectionModule":