1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 17:22:31 +01:00

[Instagram] Fix incorrect resolution (#1494)

Authored by: u-spec-png
This commit is contained in:
u-spec-png 2021-10-31 14:20:09 +00:00 committed by GitHub
parent f0ffaa1621
commit c588b602d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,8 +228,8 @@ def _real_extract(self, url):
dict)
if media:
video_url = media.get('video_url')
height = try_get(media, lambda x: x['dimensions']['height'])
width = try_get(media, lambda x: x['dimensions']['width'])
height = int_or_none(self._html_search_meta(('og:video:height', 'video:height'), webpage)) or try_get(media, lambda x: x['dimensions']['height'])
width = int_or_none(self._html_search_meta(('og:video:width', 'video:width'), webpage)) or try_get(media, lambda x: x['dimensions']['width'])
description = try_get(
media, lambda x: x['edge_media_to_caption']['edges'][0]['node']['text'],
compat_str) or media.get('caption')