mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-17 21:59:17 +00:00
[teamcoco] Use determine_ext to determine the video type
Some videos does not contain a 'type' field (#5798)
This commit is contained in:
parent
f8d5e1cfb5
commit
f9f3e3df9a
|
@ -10,6 +10,7 @@
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
qualities,
|
qualities,
|
||||||
|
determine_ext,
|
||||||
)
|
)
|
||||||
from ..compat import compat_ord
|
from ..compat import compat_ord
|
||||||
|
|
||||||
|
@ -108,7 +109,7 @@ def _check_data():
|
||||||
formats = []
|
formats = []
|
||||||
get_quality = qualities(['500k', '480p', '1000k', '720p', '1080p'])
|
get_quality = qualities(['500k', '480p', '1000k', '720p', '1080p'])
|
||||||
for filed in data['files']:
|
for filed in data['files']:
|
||||||
if filed['type'] == 'hls':
|
if determine_ext(filed['url']) == 'm3u8':
|
||||||
formats.extend(self._extract_m3u8_formats(
|
formats.extend(self._extract_m3u8_formats(
|
||||||
filed['url'], video_id, ext='mp4'))
|
filed['url'], video_id, ext='mp4'))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue