aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSebastian Haas <sehaas@deebas.com>2018-10-30 23:44:50 +0100
committerSergey M․ <dstftw@gmail.com>2018-11-02 23:47:17 +0700
commitc620694c97151396055108cd10d2a393036eb334 (patch)
tree273f63bd96f9f727ce21f42e50392bec5b051fc6 /youtube_dl
parent061ea3a776830f15dbce899bad8b48232f32aaf0 (diff)
[orf:tvthek] Fix extraction (closes #17737)
use _extract_m3u8_formats and _extract_f4m_formats helper functions closes #17737
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/orf.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/youtube_dl/extractor/orf.py b/youtube_dl/extractor/orf.py
index c1fb580ca..da8031ad2 100644
--- a/youtube_dl/extractor/orf.py
+++ b/youtube_dl/extractor/orf.py
@@ -80,14 +80,16 @@ class ORFTVthekIE(InfoExtractor):
if not video_id or not title:
continue
video_id = compat_str(video_id)
- formats = [{
- 'preference': -10 if fd['delivery'] == 'hls' else None,
- 'format_id': '%s-%s-%s' % (
- fd['delivery'], fd['quality'], fd['quality_string']),
- 'url': fd['src'],
- 'protocol': fd['protocol'],
- 'quality': quality_to_int(fd['quality']),
- } for fd in sd['sources']]
+ formats = []
+ for fd in sd['sources']:
+ format_id = '%s-%s-%s' % (
+ fd['delivery'], fd['quality'], fd['quality_string'])
+ if determine_ext(fd['src']) == 'm3u8':
+ formats.extend(self._extract_m3u8_formats(
+ fd['src'], video_id, 'mp4', m3u8_id=format_id))
+ elif determine_ext(fd['src']) == 'f4m':
+ formats.extend(self._extract_f4m_formats(
+ fd['src'], video_id, f4m_id=format_id))
# Check for geoblocking.
# There is a property is_geoprotection, but that's always false