mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-09 21:37:16 +08:00
[tele5] Prefer m3u8 download in extraction (closes #24674)
This commit is contained in:
parent
00eb865b3c
commit
32766d525a
@ -91,6 +91,19 @@ class Tele5IE(InfoExtractor):
|
|||||||
media = self._download_json(
|
media = self._download_json(
|
||||||
'https://cdn.jwplayer.com/v2/media/' + jwplatform_id,
|
'https://cdn.jwplayer.com/v2/media/' + jwplatform_id,
|
||||||
display_id)
|
display_id)
|
||||||
|
|
||||||
|
m3u8_url = try_get(
|
||||||
|
media, lambda x: x['playlist'][0]['sources'][0]['file'], compat_str)
|
||||||
|
|
||||||
|
if m3u8_url:
|
||||||
|
formats = self._extract_m3u8_formats(m3u8_url, jwplatform_id, 'mp4', fatal=False)
|
||||||
|
return {
|
||||||
|
'id': '%s' % jwplatform_id,
|
||||||
|
'title': try_get(media, lambda x: x['title'], compat_str),
|
||||||
|
# TODO: description, thumbnail, duration
|
||||||
|
'formats': formats
|
||||||
|
}
|
||||||
|
|
||||||
nexx_id = try_get(
|
nexx_id = try_get(
|
||||||
media, lambda x: x['playlist'][0]['nexx_id'], compat_str)
|
media, lambda x: x['playlist'][0]['nexx_id'], compat_str)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user