1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-12-26 08:17:54 +01:00

download works, tests fail with error AssertionError: None is not true : Missing mandatory field url

This commit is contained in:
Stefan 2020-04-09 16:42:08 +02:00
parent d5cd7f4aca
commit 6cbd8de420
2 changed files with 43 additions and 0 deletions

View File

@ -837,6 +837,7 @@ from .platzi import (
PlatziIE, PlatziIE,
PlatziCourseIE, PlatziCourseIE,
) )
from .playerglobewien import PlayerGlobeWienIE
from .playfm import PlayFMIE from .playfm import PlayFMIE
from .playplustv import PlayPlusTVIE from .playplustv import PlayPlusTVIE
from .plays import PlaysTVIE from .plays import PlaysTVIE

View File

@ -0,0 +1,42 @@
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class PlayerGlobeWienIE(InfoExtractor):
_VALID_URL = r'https?://player.globe.wien/globe-wien/(?P<id>.*)'
_TEST = {
'url': 'https://player.globe.wien/globe-wien/corona-podcast-teil-4',
'info_dict': {
'id': 'corona-podcast-teil-4',
'ext': 'mp4',
'title': 'Globe Wien VOD - Eckel & Niavarani & Sarsam - Im Endspurt versagt',
'url': 'https://player.globe.wien/globe-wien/corona-podcast-teil-4',
},
'params': {
'format': 'bestvideo+bestaudio/best',
}
}
def _real_extract(self, url):
video_id = self._match_id(url)
print(video_id)
webpage = self._download_webpage(url, video_id)
formats = []
title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title')
stream_url = self._download_webpage("https://player.globe.wien/api/playout?vodId="+video_id, video_id)
hls_url = self._parse_json(stream_url, video_id)['streamUrl']['hls']
formats.extend(self._extract_m3u8_formats(
hls_url, video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls'))
self._sort_formats(formats)
return {
'id': video_id,
'title': title,
'formats': formats,
}