mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-23 12:40:11 +09:00
[extractor/common] Fix _media_formats
This commit is contained in:
parent
70851a95c3
commit
868f79db41
@ -2115,7 +2115,7 @@ class InfoExtractor(object):
|
|||||||
return f
|
return f
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
def _media_formats(src, type_info, cur_media_type):
|
def _media_formats(src, cur_media_type, type_info={}):
|
||||||
full_url = absolute_url(src)
|
full_url = absolute_url(src)
|
||||||
ext = type_info.get('ext') or determine_ext(full_url)
|
ext = type_info.get('ext') or determine_ext(full_url)
|
||||||
if ext == 'm3u8':
|
if ext == 'm3u8':
|
||||||
@ -2167,7 +2167,7 @@ class InfoExtractor(object):
|
|||||||
if not src:
|
if not src:
|
||||||
continue
|
continue
|
||||||
f = parse_content_type(source_attributes.get('type'))
|
f = parse_content_type(source_attributes.get('type'))
|
||||||
is_plain_url, formats = _media_formats(src, f, media_type)
|
is_plain_url, formats = _media_formats(src, media_type, f)
|
||||||
if is_plain_url:
|
if is_plain_url:
|
||||||
f.update(formats[0])
|
f.update(formats[0])
|
||||||
media_info['formats'].append(f)
|
media_info['formats'].append(f)
|
||||||
|
Loading…
Reference in New Issue
Block a user