]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/tele5.py
1 from .dplay
import DPlayIE
2 from ..compat
import compat_urlparse
9 class Tele5IE(DPlayIE
):
10 _VALID_URL
= r
'https?://(?:www\.)?tele5\.de/(?:[^/]+/)*(?P<id>[^/?#&]+)'
11 _GEO_COUNTRIES
= ['DE']
13 'url': 'https://www.tele5.de/mediathek/filme-online/videos?vid=1549416',
17 'upload_date': '20180814',
18 'timestamp': 1534290623,
22 'skip_download': True,
24 'skip': 'No longer available: "404 Seite nicht gefunden"',
26 # jwplatform, nexx unavailable
27 'url': 'https://www.tele5.de/filme/ghoul-das-geheimnis-des-friedhofmonsters/',
31 'upload_date': '20200603',
32 'timestamp': 1591214400,
33 'title': 'Ghoul - Das Geheimnis des Friedhofmonsters',
34 'description': 'md5:42002af1d887ff3d5b2b3ca1f8137d97',
37 'skip_download': True,
39 'skip': 'No longer available, redirects to Filme page',
41 'url': 'https://tele5.de/mediathek/angel-of-mine/',
45 'upload_date': '20220109',
46 'timestamp': 1641762000,
47 'title': 'Angel of Mine',
48 'description': 'md5:a72546a175e1286eb3251843a52d1ad7',
51 'format': 'bestvideo',
54 'url': 'https://www.tele5.de/kalkofes-mattscheibe/video-clips/politik-und-gesellschaft?ve_id=1551191',
55 'only_matching': True,
57 'url': 'https://www.tele5.de/video-clip/?ve_id=1609440',
58 'only_matching': True,
60 'url': 'https://www.tele5.de/filme/schlefaz-dragon-crusaders/',
61 'only_matching': True,
63 'url': 'https://www.tele5.de/filme/making-of/avengers-endgame/',
64 'only_matching': True,
66 'url': 'https://www.tele5.de/star-trek/raumschiff-voyager/ganze-folge/das-vinculum/',
67 'only_matching': True,
69 'url': 'https://www.tele5.de/anders-ist-sevda/',
70 'only_matching': True,
73 def _real_extract(self
, url
):
74 video_id
= self
._match
_id
(url
)
75 webpage
= self
._download
_webpage
(url
, video_id
)
76 player_element
= self
._search
_regex
(r
'(<hyoga-player\b[^>]+?>)', webpage
, 'video player')
77 player_info
= extract_attributes(player_element
)
78 asset_id
, country
, realm
= (player_info
[x
] for x
in ('assetid', 'locale', 'realm', ))
79 endpoint
= compat_urlparse
.urlparse(player_info
['endpoint']).hostname
80 source_type
= player_info
.get('sourcetype')
82 endpoint
= '%s-%s' % (source_type
, endpoint
)
84 return self
._get
_disco
_api
_info
(url
, asset_id
, endpoint
, realm
, country
)
85 except ExtractorError
as e
:
86 if getattr(e
, 'message', '') == 'Missing deviceId in context':
87 self
.report_drm(video_id
)