aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/konserthusetplay.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-01-24 22:55:49 +0700
committerSergey M․ <dstftw@gmail.com>2017-01-24 22:55:49 +0700
commit74af9c700d308e3638db0ff2e4510770f9daf31c (patch)
tree07f8331ef9ebdf4fe130f79ae89e7ff835d4ebb0 /youtube_dl/extractor/konserthusetplay.py
parentd61aa5eb37244a04caa09f1f238a4f81366c109b (diff)
[konserthusetplay] Add support for hls formats (closes #11823)
Diffstat (limited to 'youtube_dl/extractor/konserthusetplay.py')
-rw-r--r--youtube_dl/extractor/konserthusetplay.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/youtube_dl/extractor/konserthusetplay.py b/youtube_dl/extractor/konserthusetplay.py
index 55291c66f..7e6ea9696 100644
--- a/youtube_dl/extractor/konserthusetplay.py
+++ b/youtube_dl/extractor/konserthusetplay.py
@@ -3,6 +3,7 @@ from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
+ determine_ext,
float_or_none,
int_or_none,
)
@@ -42,12 +43,18 @@ class KonserthusetPlayIE(InfoExtractor):
player_config = media['playerconfig']
playlist = player_config['playlist']
- source = next(f for f in playlist if f.get('bitrates'))
+ source = next(f for f in playlist if f.get('bitrates') or f.get('provider'))
FORMAT_ID_REGEX = r'_([^_]+)_h264m\.mp4'
formats = []
+ m3u8_url = source.get('url')
+ if m3u8_url and determine_ext(m3u8_url) == 'm3u8':
+ formats.extend(self._extract_m3u8_formats(
+ m3u8_url, video_id, 'mp4', entry_protocol='m3u8_native',
+ m3u8_id='hls', fatal=False))
+
fallback_url = source.get('fallbackUrl')
fallback_format_id = None
if fallback_url: