mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-25 20:55:52 +01:00
parent
d6579d532b
commit
f1150b9e1e
@ -15,6 +15,7 @@
|
|||||||
ExtractorError,
|
ExtractorError,
|
||||||
float_or_none,
|
float_or_none,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
|
traverse_obj,
|
||||||
try_get,
|
try_get,
|
||||||
strip_or_none,
|
strip_or_none,
|
||||||
unified_timestamp,
|
unified_timestamp,
|
||||||
@ -55,7 +56,7 @@ def _extract_variant_formats(self, variant, video_id):
|
|||||||
def _extract_formats_from_vmap_url(self, vmap_url, video_id):
|
def _extract_formats_from_vmap_url(self, vmap_url, video_id):
|
||||||
vmap_url = url_or_none(vmap_url)
|
vmap_url = url_or_none(vmap_url)
|
||||||
if not vmap_url:
|
if not vmap_url:
|
||||||
return []
|
return [], {}
|
||||||
vmap_data = self._download_xml(vmap_url, video_id)
|
vmap_data = self._download_xml(vmap_url, video_id)
|
||||||
formats = []
|
formats = []
|
||||||
subtitles = {}
|
subtitles = {}
|
||||||
@ -508,7 +509,7 @@ def add_thumbnail(name, size):
|
|||||||
'duration': float_or_none(video_info.get('duration_millis'), 1000),
|
'duration': float_or_none(video_info.get('duration_millis'), 1000),
|
||||||
})
|
})
|
||||||
|
|
||||||
media = try_get(status, lambda x: x['extended_entities']['media'][0])
|
media = traverse_obj(status, ((None, 'quoted_status'), 'extended_entities', 'media', 0), get_all=False)
|
||||||
if media and media.get('type') != 'photo':
|
if media and media.get('type') != 'photo':
|
||||||
extract_from_video_info(media)
|
extract_from_video_info(media)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user