3 from .dplay
import DiscoveryPlusBaseIE
4 from ..utils
import join_nonempty
5 from ..utils
.traversal
import traverse_obj
8 class Tele5IE(DiscoveryPlusBaseIE
):
9 _VALID_URL
= r
'https?://(?:www\.)?tele5\.de/(?P<parent_slug>[\w-]+)/(?P<slug_a>[\w-]+)(?:/(?P<slug_b>[\w-]+))?'
12 'url': 'https://tele5.de/mediathek/stargate-atlantis/quarantane',
16 'title': 'Quarantäne',
17 'description': 'md5:6af0373bd0fcc4f13e5d47701903d675',
18 'episode': 'Episode 73',
22 'series': 'Stargate Atlantis',
23 'upload_date': '20240525',
24 'timestamp': 1716643200,
26 'thumbnail': 'https://eu1-prod-images.disco-api.com/2024/05/21/c81fcb45-8902-309b-badb-4e6d546b575d.jpeg',
27 'creators': ['Tele5'],
32 'url': 'https://tele5.de/mediathek/inside-out',
36 'title': 'Inside out',
37 'description': 'md5:7e5f32ed0be5ddbd27713a34b9293bfd',
38 'series': 'Inside out',
39 'upload_date': '20240523',
40 'timestamp': 1716494400,
42 'thumbnail': 'https://eu1-prod-images.disco-api.com/2024/05/15/181eba3c-f9f0-3faf-b14d-0097050a3aa4.jpeg',
43 'creators': ['Tele5'],
48 'url': 'https://tele5.de/mediathek/schlefaz',
50 'id': 'mediathek-schlefaz',
52 'playlist_mincount': 3,
55 def _real_extract(self
, url
):
56 parent_slug
, slug_a
, slug_b
= self
._match
_valid
_url
(url
).group('parent_slug', 'slug_a', 'slug_b')
57 playlist_id
= join_nonempty(parent_slug
, slug_a
, slug_b
, delim
='-')
59 query
= {'environment': 'tele5', 'v': '2'}
61 endpoint
= f
'page/{slug_a}'
62 query
['parent_slug'] = parent_slug
64 endpoint
= f
'videos/{slug_b}'
65 query
['filter[show.slug]'] = slug_a
66 cms_data
= self
._download
_json
(f
'https://de-api.loma-cms.com/feloma/{endpoint}/', playlist_id
, query
=query
)
68 return self
.playlist_result(map(
69 functools
.partial(self
._get
_disco
_api
_info
, url
, disco_host
='eu1-prod.disco-api.com', realm
='dmaxde', country
='DE'),
70 traverse_obj(cms_data
, ('blocks', ..., 'videoId', {str}
))), playlist_id
)
72 def _update_disco_api_headers(self
, headers
, disco_base
, display_id
, realm
):
74 'x-disco-params': f
'realm={realm}',
75 'x-disco-client': 'Alps:HyogaPlayer:0.0.0',
76 'Authorization': self
._get
_auth
(disco_base
, display_id
, realm
),