Skip to content

Commit

Permalink
[deviantart] prevent exception on empty videos (fixes #1796)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Aug 25, 2021
1 parent ae78d95 commit a4f249c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gallery_dl/extractor/deviantart.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def items(self):
content = self.api.deviation_download(deviation["deviationid"])
yield self.commit(deviation, content)

if "videos" in deviation:
if "videos" in deviation and deviation["videos"]:
video = max(deviation["videos"],
key=lambda x: text.parse_int(x["quality"][:-1]))
yield self.commit(deviation, video)
Expand Down

0 comments on commit a4f249c

Please sign in to comment.