]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/discoverynetworks.py
2 from __future__
import unicode_literals
6 from .dplay
import DPlayIE
9 class DiscoveryNetworksDeIE(DPlayIE
):
10 _VALID_URL
= r
'https?://(?:www\.)?(?P<domain>(?:tlc|dmax)\.de|dplay\.co\.uk)/(?:programme|show)/(?P<programme>[^/]+)/video/(?P<alternate_id>[^/]+)'
13 'url': 'https://www.tlc.de/programme/breaking-amish/video/die-welt-da-drauen/DCB331270001100',
17 'title': 'Die Welt da draußen',
18 'description': 'md5:61033c12b73286e409d99a41742ef608',
19 'timestamp': 1554069600,
20 'upload_date': '20190331',
23 'format': 'bestvideo',
24 'skip_download': True,
27 'url': 'https://www.dmax.de/programme/dmax-highlights/video/tuning-star-sidney-hoffmann-exklusiv-bei-dmax/191023082312316',
28 'only_matching': True,
30 'url': 'https://www.dplay.co.uk/show/ghost-adventures/video/hotel-leger-103620/EHD_280313B',
31 'only_matching': True,
34 def _real_extract(self
, url
):
35 domain
, programme
, alternate_id
= re
.match(self
._VALID
_URL
, url
).groups()
36 country
= 'GB' if domain
== 'dplay.co.uk' else 'DE'
37 realm
= 'questuk' if country
== 'GB' else domain
.replace('.', '')
38 return self
._get
_disco
_api
_info
(
39 url
, '%s/%s' % (programme
, alternate_id
),
40 'sonic-eu1-prod.disco-api.com', realm
, country
)