mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2025-02-18 18:17:55 +01:00
playerglobewien - extract all links and add audio only support
This commit is contained in:
parent
efbbe76a63
commit
873b80d0ff
@ -23,11 +23,12 @@ class PlayerGlobeWienIE(InfoExtractor):
|
|||||||
'url': 'https://player.globe.wien/globe-wien/corona-podcast-teil-4',
|
'url': 'https://player.globe.wien/globe-wien/corona-podcast-teil-4',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'corona-podcast-teil-4',
|
'id': 'corona-podcast-teil-4',
|
||||||
'ext': 'mp4',
|
'ext': 'm4a',
|
||||||
'title': 'Eckel & Niavarani & Sarsam - Im Endspurt versagt',
|
'title': 'Eckel & Niavarani & Sarsam - Im Endspurt versagt',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'format': 'bestaudio',
|
'format': 'bestaudio',
|
||||||
|
'skip_download': True,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -45,11 +46,20 @@ class PlayerGlobeWienIE(InfoExtractor):
|
|||||||
'url': 'https://player.hader.at/hader/hader-indien-video',
|
'url': 'https://player.hader.at/hader/hader-indien-video',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'hader-indien-video',
|
'id': 'hader-indien-video',
|
||||||
'ext': 'mp4',
|
'ext': 'm4a',
|
||||||
'title': 'Film der Woche - Indien',
|
'title': 'Film der Woche - Indien',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'format': 'bestaudio',
|
'format': 'bestaudio',
|
||||||
|
'skip_download': True,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'url': 'https://player.hader.at/hader/hader-indien',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'hader-indien',
|
||||||
|
'ext': 'mp3',
|
||||||
|
'title': 'Hader & Dorfer lesen Indien',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@ -62,12 +72,23 @@ class PlayerGlobeWienIE(InfoExtractor):
|
|||||||
title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title')
|
title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title')
|
||||||
title = re.sub(r'^(Globe Wien VOD -|Hader VOD -)\s*', '', title)
|
title = re.sub(r'^(Globe Wien VOD -|Hader VOD -)\s*', '', title)
|
||||||
|
|
||||||
stream_url = self._download_webpage("https://player.globe.wien/api/playout?vodId=" + video_id, video_id)
|
streamurl = self._download_json("https://player.globe.wien/api/playout?vodId=" + video_id,
|
||||||
|
video_id).get('streamUrl')
|
||||||
|
|
||||||
hls_url = self._parse_json(stream_url, video_id)['streamUrl']['hls']
|
if streamurl.get('hls'):
|
||||||
|
formats.extend(self._extract_m3u8_formats(
|
||||||
|
streamurl.get('hls'), video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls'))
|
||||||
|
|
||||||
formats.extend(self._extract_m3u8_formats(
|
if streamurl.get('dash'):
|
||||||
hls_url, video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls'))
|
formats.extend(self._extract_mpd_formats(
|
||||||
|
streamurl.get('dash'), video_id, mpd_id='dash', fatal=False))
|
||||||
|
|
||||||
|
if streamurl.get('audio'):
|
||||||
|
return {
|
||||||
|
'id': video_id,
|
||||||
|
'title': title,
|
||||||
|
'url': streamurl.get('audio'),
|
||||||
|
}
|
||||||
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user