1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-05-18 02:59:31 +00:00

Should work now

This commit is contained in:
Tobias Bell 2022-08-30 16:46:22 +02:00
parent 325427ce17
commit 7b21482907

View file

@ -9,7 +9,7 @@ class W24atIE(InfoExtractor):
_VALID_URL = r'https://(?:www\.)?w24\.at/Video/.*/(?P<id>[0-9]+)'
_TEST = {
'url': 'https://www.w24.at/Video/Bewegung-macht-Spass-Folge-62-Kids-6/24828',
'md5': 'cc1bd6c334ed284a44528c6dbc9bc6ff',
'md5': '16e6f1c5d4a0d54d420e3d9d122660a1',
'info_dict': {
'id': '24828',
'ext': 'mp4',
@ -26,20 +26,19 @@ class W24atIE(InfoExtractor):
media_server = self._html_search_regex(r'var\s*mediaServer\s*=\s*\{.*"vod"\s*:\s*"([^"]+)"',
webpage, "vod", "ms02.w24.at")
mp4_path = self._html_search_regex(r"src:.*\+ '([^']+)'.*type:'video/mp4'",
webpage, "mp4_video")
webpage, "mp4_path")
m3u8_path = self._html_search_regex(r"src:.*\+ '([^']+)'.*type:'application/x-mpegURL'",
webpage, "m3u8")
webpage, "m3u8_path")
formats = []
if mp4_path:
formats.append({'url': "https://%s%s" % (media_server, mp4_path)})
formats.extend(self._extract_m3u8_formats("https://%s%s" % (media_server, m3u8_path), video_id, 'mp4', entry_protocol='m3u8_native'))
formats.append({'url': "https://%s%s" % (media_server, mp4_path), 'ext': 'mp4'})
formats.extend(self._extract_m3u8_formats("https://%s%s" % (media_server, m3u8_path), video_id, ext='mp4'))
self._sort_formats(formats)
return {
'id': video_id,
'title': re.sub(r'\s+-\sW24\s*$', '', self._og_search_title(webpage)),
'description': self._og_search_description(webpage),
'formats': formats,
'extension': 'mp4',
'thumbnail': self._og_search_thumbnail(webpage),
'uploader': self._og_search_property('site_name', webpage, fatal=False),
}