aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/vodplatform.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2016-09-16 19:30:38 +0100
committerRemita Amine <remitamine@gmail.com>2016-09-16 19:30:38 +0100
commit6ad0219556cefe60239027633193cc9f1dc9fb1d (patch)
treeb467c462d28510454a5199ec7c93f170899ed427 /youtube_dl/extractor/vodplatform.py
parent98b7506e96b5ac107a777d8bb8900623d832fba4 (diff)
[common] add helper method for Wowza Streaming Engine format extraction
Diffstat (limited to 'youtube_dl/extractor/vodplatform.py')
-rw-r--r--youtube_dl/extractor/vodplatform.py25
1 files changed, 2 insertions, 23 deletions
diff --git a/youtube_dl/extractor/vodplatform.py b/youtube_dl/extractor/vodplatform.py
index 7bdd8b1dc..239644340 100644
--- a/youtube_dl/extractor/vodplatform.py
+++ b/youtube_dl/extractor/vodplatform.py
@@ -25,29 +25,8 @@ class VODPlatformIE(InfoExtractor):
title = unescapeHTML(self._og_search_title(webpage))
hidden_inputs = self._hidden_inputs(webpage)
- base_url = self._search_regex(
- '(.*/)(?:playlist.m3u8|manifest.mpd)',
- hidden_inputs.get('HiddenmyhHlsLink') or hidden_inputs['HiddenmyDashLink'],
- 'base url')
- formats = self._extract_m3u8_formats(
- base_url + 'playlist.m3u8', video_id, 'mp4',
- 'm3u8_native', m3u8_id='hls', fatal=False)
- formats.extend(self._extract_mpd_formats(
- base_url + 'manifest.mpd', video_id,
- mpd_id='dash', fatal=False))
- rtmp_formats = self._extract_smil_formats(
- base_url + 'jwplayer.smil', video_id, fatal=False)
- for rtmp_format in rtmp_formats:
- rtsp_format = rtmp_format.copy()
- rtsp_format['url'] = '%s/%s' % (rtmp_format['url'], rtmp_format['play_path'])
- del rtsp_format['play_path']
- del rtsp_format['ext']
- rtsp_format.update({
- 'url': rtsp_format['url'].replace('rtmp://', 'rtsp://'),
- 'format_id': rtmp_format['format_id'].replace('rtmp', 'rtsp'),
- 'protocol': 'rtsp',
- })
- formats.extend([rtmp_format, rtsp_format])
+ formats = self._extract_wowza_formats(
+ hidden_inputs.get('HiddenmyhHlsLink') or hidden_inputs['HiddenmyDashLink'], video_id, skip_protocols=['f4m', 'smil'])
self._sort_formats(formats)
return {