]>
jfr.im git - yt-dlp.git/blob - youtube_dlc/extractor/servus.py
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
9 class ServusIE(InfoExtractor
):
14 servus\.com/(?:(?:at|de)/p/[^/]+|tv/videos)|
17 /(?P<id>[aA]{2}-\w+|\d+-\d+)
21 'url': 'https://www.servustv.com/videos/aa-1t6vbu5pw1w12/',
22 'md5': '3e1dd16775aa8d5cbef23628cfffc1f4',
24 'id': 'AA-1T6VBU5PW1W12',
26 'title': 'Die GrĂ¼nen aus Sicht des Volkes',
27 'description': 'md5:1247204d85783afe3682644398ff2ec4',
28 'thumbnail': r
're:^https?://.*\.jpg',
32 'url': 'https://www.servus.com/de/p/Die-Gr%C3%BCnen-aus-Sicht-des-Volkes/AA-1T6VBU5PW1W12/',
33 'only_matching': True,
35 'url': 'https://www.servus.com/at/p/Wie-das-Leben-beginnt/1309984137314-381415152/',
36 'only_matching': True,
38 'url': 'https://www.servus.com/tv/videos/aa-1t6vbu5pw1w12/',
39 'only_matching': True,
41 'url': 'https://www.servus.com/tv/videos/1380889096408-1235196658/',
42 'only_matching': True,
45 def _real_extract(self
, url
):
46 video_id
= self
._match
_id
(url
).upper()
47 webpage
= self
._download
_webpage
(url
, video_id
)
49 title
= self
._search
_regex
(
50 (r
'videoLabel\s*=\s*(["\'])(?P
<title
>(?
:(?
!\
1).)+)\
1',
51 r'<h\d
+[^
>]+\bclass
=["\']heading--(?:one|two)["\'][^
>]*>(?P
<title
>[^
<]+)'),
52 webpage, 'title
', default=None,
53 group='title
') or self._og_search_title(webpage)
54 title = re.sub(r'\s
*-\s
*Servus TV\s
*$
', '', title)
55 description = self._og_search_description(webpage)
56 thumbnail = self._og_search_thumbnail(webpage)
58 formats = self._extract_m3u8_formats(
59 'https
://stv
.rbmbtnx
.net
/api
/v1
/manifests
/%s.m3u8
' % video_id,
60 video_id, 'mp4
', entry_protocol='m3u8_native
', m3u8_id='hls
')
61 self._sort_formats(formats)
66 'description
': description,
67 'thumbnail
': thumbnail,