|
|
|
@ -2622,7 +2622,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|
|
|
|
'filesize': int_or_none(fmt.get('contentLength')),
|
|
|
|
|
'format_id': itag,
|
|
|
|
|
'format_note': ', '.join(filter(None, (
|
|
|
|
|
audio_track.get('displayName'),
|
|
|
|
|
'%s%s' % (audio_track.get('displayName') or '',
|
|
|
|
|
' (default)' if audio_track.get('audioIsDefault') else ''),
|
|
|
|
|
fmt.get('qualityLabel') or quality.replace('audio_quality_', '')))),
|
|
|
|
|
'fps': int_or_none(fmt.get('fps')),
|
|
|
|
|
'height': height,
|
|
|
|
@ -2631,6 +2632,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|
|
|
|
'url': fmt_url,
|
|
|
|
|
'width': int_or_none(fmt.get('width')),
|
|
|
|
|
'language': audio_track.get('id', '').split('.')[0],
|
|
|
|
|
'language_preference': 1 if audio_track.get('audioIsDefault') else -1,
|
|
|
|
|
}
|
|
|
|
|
mime_mobj = re.match(
|
|
|
|
|
r'((?:[^/]+)/(?:[^;]+))(?:;\s*codecs="([^"]+)")?', fmt.get('mimeType') or '')
|
|
|
|
@ -2817,7 +2819,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|
|
|
|
|
|
|
|
|
# Source is given priority since formats that throttle are given lower source_preference
|
|
|
|
|
# When throttling issue is fully fixed, remove this
|
|
|
|
|
self._sort_formats(formats, ('quality', 'height', 'fps', 'source'))
|
|
|
|
|
self._sort_formats(formats, ('quality', 'res', 'fps', 'source', 'codec:vp9.2', 'size', 'br', 'lang'))
|
|
|
|
|
|
|
|
|
|
keywords = get_first(video_details, 'keywords', expected_type=list) or []
|
|
|
|
|
if not keywords and webpage:
|
|
|
|
|