mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 08:47:41 +00:00
[utils] add mimetypes to determine manifest ext(m3u8, f4m, mpd)
This commit is contained in:
parent
2817b99cf2
commit
b4173f1551
1 changed files with 7 additions and 0 deletions
|
@ -2097,6 +2097,7 @@ def mimetype2ext(mt):
|
||||||
return ext
|
return ext
|
||||||
|
|
||||||
_, _, res = mt.rpartition('/')
|
_, _, res = mt.rpartition('/')
|
||||||
|
res = res.lower()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'3gpp': '3gp',
|
'3gpp': '3gp',
|
||||||
|
@ -2108,6 +2109,12 @@ def mimetype2ext(mt):
|
||||||
'x-flv': 'flv',
|
'x-flv': 'flv',
|
||||||
'x-mp4-fragmented': 'mp4',
|
'x-mp4-fragmented': 'mp4',
|
||||||
'x-ms-wmv': 'wmv',
|
'x-ms-wmv': 'wmv',
|
||||||
|
'mpegurl': 'm3u8',
|
||||||
|
'x-mpegurl': 'm3u8',
|
||||||
|
'vnd.apple.mpegurl': 'm3u8',
|
||||||
|
'dash+xml': 'mpd',
|
||||||
|
'f4m': 'f4m',
|
||||||
|
'f4m+xml': 'f4m',
|
||||||
}.get(res, res)
|
}.get(res, res)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue