From bd7e0caa13859c04d9a6c50679c8d5f0a7eab27b Mon Sep 17 00:00:00 2001 From: Oneboy1979 Date: Sun, 12 Apr 2020 10:57:36 +0200 Subject: [PATCH] playerglobewien - add audio only to formats to prevent to returns --- youtube_dl/extractor/playerglobewien.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/youtube_dl/extractor/playerglobewien.py b/youtube_dl/extractor/playerglobewien.py index 2ca930e4c..bf622d331 100755 --- a/youtube_dl/extractor/playerglobewien.py +++ b/youtube_dl/extractor/playerglobewien.py @@ -65,34 +65,33 @@ class PlayerGlobeWienIE(InfoExtractor): ] def _real_extract(self, url): - video_id = self._match_id(url) - print(video_id) - webpage = self._download_webpage(url, video_id) + format_id = self._match_id(url) + webpage = self._download_webpage(url, format_id) formats = [] title = self._og_search_title(webpage) title = re.sub(r'^(Globe Wien VOD -|Hader VOD -)\s*', '', title) - streamurl = self._download_json("https://player.globe.wien/api/playout?vodId=" + video_id, - video_id).get('streamUrl') + streamurl = self._download_json("https://player.globe.wien/api/playout?vodId=" + format_id, + format_id).get('streamUrl') if streamurl.get('hls'): formats.extend(self._extract_m3u8_formats( - streamurl.get('hls'), video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls')) + streamurl.get('hls'), format_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls')) if streamurl.get('dash'): formats.extend(self._extract_mpd_formats( - streamurl.get('dash'), video_id, mpd_id='dash', fatal=False)) + streamurl.get('dash'), format_id, mpd_id='dash', fatal=False)) if streamurl.get('audio'): - return { - 'id': video_id, - 'title': title, + formats.append({ 'url': streamurl.get('audio'), - } + 'format_id': format_id, + 'vcodec': 'none', + }) self._sort_formats(formats) return { - 'id': video_id, + 'id': format_id, 'title': title, 'formats': formats, }