mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-02-01 03:51:42 +01:00
[instagram] fix exception on empty 'video_versions' (#4795)
This commit is contained in:
parent
807ddde7e1
commit
5e58d2b455
@ -217,9 +217,10 @@ class InstagramExtractor(Extractor):
|
||||
data["post_shortcode"])
|
||||
continue
|
||||
|
||||
if "video_versions" in item:
|
||||
video_versions = item.get("video_versions")
|
||||
if video_versions:
|
||||
video = max(
|
||||
item["video_versions"],
|
||||
video_versions,
|
||||
key=lambda x: (x["width"], x["height"], x["type"]),
|
||||
)
|
||||
media = video
|
||||
|
@ -6,4 +6,4 @@
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
__version__ = "1.26.2"
|
||||
__version__ = "1.26.3-dev"
|
||||
|
Loading…
x
Reference in New Issue
Block a user