mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-01 22:47:59 +00:00
[WDR] add special handling if alt-url is a m3u8
This commit is contained in:
parent
37f972954d
commit
bec2c14f2c
1 changed files with 16 additions and 5 deletions
|
@ -9,6 +9,7 @@ from ..compat import (
|
||||||
compat_urlparse,
|
compat_urlparse,
|
||||||
)
|
)
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
|
determine_ext,
|
||||||
strip_jsonp,
|
strip_jsonp,
|
||||||
unified_strdate,
|
unified_strdate,
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
|
@ -61,7 +62,7 @@ class WDRIE(InfoExtractor):
|
||||||
'url': 'http://www1.wdr.de/mediathek/video/live/index.html',
|
'url': 'http://www1.wdr.de/mediathek/video/live/index.html',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'mdb-103364',
|
'id': 'mdb-103364',
|
||||||
'ext': 'flv',
|
'ext': 'mp4',
|
||||||
'display_id': 'index',
|
'display_id': 'index',
|
||||||
'title': r're:^WDR Fernsehen im Livestream [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
|
'title': r're:^WDR Fernsehen im Livestream [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
|
||||||
'alt_title': 'WDR Fernsehen Live',
|
'alt_title': 'WDR Fernsehen Live',
|
||||||
|
@ -69,7 +70,10 @@ class WDRIE(InfoExtractor):
|
||||||
'description': 'md5:ae2ff888510623bf8d4b115f95a9b7c9',
|
'description': 'md5:ae2ff888510623bf8d4b115f95a9b7c9',
|
||||||
'is_live': True,
|
'is_live': True,
|
||||||
'subtitles': {}
|
'subtitles': {}
|
||||||
}
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True, # m3u8 download
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'url': 'http://www1.wdr.de/mediathek/video/sendungen/aktuelle-stunde/aktuelle-stunde-120.html',
|
'url': 'http://www1.wdr.de/mediathek/video/sendungen/aktuelle-stunde/aktuelle-stunde-120.html',
|
||||||
|
@ -126,8 +130,15 @@ class WDRIE(InfoExtractor):
|
||||||
if metadata_media_alt:
|
if metadata_media_alt:
|
||||||
for tag_name in ['videoURL', 'audioURL']:
|
for tag_name in ['videoURL', 'audioURL']:
|
||||||
if tag_name in metadata_media_alt:
|
if tag_name in metadata_media_alt:
|
||||||
|
alt_url = metadata_media_alt[tag_name]
|
||||||
|
if determine_ext(alt_url) == 'm3u8':
|
||||||
|
m3u_fmt = self._extract_m3u8_formats(
|
||||||
|
alt_url, display_id, 'mp4', 'm3u8_native',
|
||||||
|
m3u8_id='hls')
|
||||||
|
formats.extend(m3u_fmt)
|
||||||
|
else:
|
||||||
formats.append({
|
formats.append({
|
||||||
'url': metadata_media_alt[tag_name]
|
'url': alt_url
|
||||||
})
|
})
|
||||||
|
|
||||||
# check if there are flash-streams for this video
|
# check if there are flash-streams for this video
|
||||||
|
|
Loading…
Reference in a new issue