[instagram] fix exception on empty 'video_versions' (#4795)
This commit is contained in:
@@ -217,9 +217,10 @@ class InstagramExtractor(Extractor):
|
|||||||
data["post_shortcode"])
|
data["post_shortcode"])
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if "video_versions" in item:
|
video_versions = item.get("video_versions")
|
||||||
|
if video_versions:
|
||||||
video = max(
|
video = max(
|
||||||
item["video_versions"],
|
video_versions,
|
||||||
key=lambda x: (x["width"], x["height"], x["type"]),
|
key=lambda x: (x["width"], x["height"], x["type"]),
|
||||||
)
|
)
|
||||||
media = video
|
media = video
|
||||||
|
|||||||
@@ -6,4 +6,4 @@
|
|||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
# published by the Free Software Foundation.
|
# published by the Free Software Foundation.
|
||||||
|
|
||||||
__version__ = "1.26.2"
|
__version__ = "1.26.3-dev"
|
||||||
|
|||||||
Reference in New Issue
Block a user