1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-09 20:57:15 +08:00

[tele5] Prefer m3u8 download in extraction (closes #24674)

This commit is contained in:
FliegendeWurst 2020-04-12 01:40:13 +02:00
parent 00eb865b3c
commit 32766d525a
No known key found for this signature in database
GPG Key ID: CA38E82B54B32A88

View File

@ -91,6 +91,19 @@ class Tele5IE(InfoExtractor):
media = self._download_json(
'https://cdn.jwplayer.com/v2/media/' + jwplatform_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(
media, lambda x: x['playlist'][0]['nexx_id'], compat_str)