mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-23 12:40:11 +09:00
Changed m3u8 format handling
This commit is contained in:
parent
bb4d3baa67
commit
71e630eebf
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
|
determine_ext,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
qualities,
|
qualities,
|
||||||
)
|
)
|
||||||
@ -65,12 +66,17 @@ class DumpertIE(InfoExtractor):
|
|||||||
if not uri:
|
if not uri:
|
||||||
continue
|
continue
|
||||||
version = variant.get('version')
|
version = variant.get('version')
|
||||||
|
ext = determine_ext(uri)
|
||||||
|
if ext == 'm3u8':
|
||||||
|
formats.extend(self._extract_m3u8_formats(
|
||||||
|
uri, video_id, ext='mp4', m3u8_id=format_id))
|
||||||
|
else:
|
||||||
formats.append({
|
formats.append({
|
||||||
'url': uri,
|
'url': uri,
|
||||||
'format_id': version,
|
'format_id': version,
|
||||||
'quality': quality(version),
|
|
||||||
'ext': 'mp4',
|
|
||||||
})
|
})
|
||||||
|
for format in formats:
|
||||||
|
format['quality'] = quality(format['format_id'])
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
thumbnails = []
|
thumbnails = []
|
||||||
|
Loading…
Reference in New Issue
Block a user