Compare commits

...

7 Commits

Author SHA1 Message Date
Tobias Bell
9b8167c587
Merge 8c8b07c4e9 into 0153b387e5 2024-06-14 10:47:23 +00:00
dirkf
8c8b07c4e9
Small update, force CI 2023-02-03 04:11:27 +00:00
Tobias Bell
7b21482907 Should work now 2022-08-30 16:46:22 +02:00
Tobias Bell
325427ce17 In between 2022-08-30 13:34:55 +02:00
Tobias Bell
48f020cb9a
Apply suggestions from code review
Co-authored-by: dirkf <fieldhouse@gmx.net>
2022-08-30 12:58:39 +02:00
Tobias Bell
25fcfdf566 Remove unnecessary import 2022-08-29 11:58:14 +02:00
Tobias Bell
907a09cbf7 [w24at] Add new extractor 2022-08-29 11:56:06 +02:00
2 changed files with 46 additions and 0 deletions

View File

@ -1590,6 +1590,7 @@ from .wsj import (
WSJArticleIE,
)
from .wwe import WWEIE
from .w24at import W24atIE
from .xbef import XBefIE
from .xboxclips import XboxClipsIE
from .xfileshare import XFileShareIE

View File

@ -0,0 +1,45 @@
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
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': '16e6f1c5d4a0d54d420e3d9d122660a1',
'info_dict': {
'id': '24828',
'ext': 'mp4',
'title': 'Bewegung macht Spaß! - Folge 62: Kids 6',
'description': 'Stefans Ziel ist es Kindern auch hinter den Bildschirmen zur Bewegung und zum Denksport zu animieren und das ganze mit Spaß und Köpfchen zu verbinden.',
'thumbnail': r're:.*\.jpg$',
'uploader': 'W24'
}
}
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
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_path")
m3u8_path = self._html_search_regex(r"src:.*\+ '([^']+)'.*type:'application/x-mpegURL'",
webpage, "m3u8_path")
formats = []
if mp4_path:
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,
'thumbnail': self._og_search_thumbnail(webpage),
'uploader': self._og_search_property('site_name', webpage, fatal=False),
}