]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/vtm.py
1 from .common
import InfoExtractor
9 class VTMIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?vtm\.be/([^/?&#]+)~v(?P<id>[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12})'
12 'url': 'https://vtm.be/gast-vernielt-genkse-hotelkamer~ve7534523-279f-4b4d-a5c9-a33ffdbe23e1',
13 'md5': '37dca85fbc3a33f2de28ceb834b071f8',
17 'title': 'Gast vernielt Genkse hotelkamer',
18 'timestamp': 1611060180,
19 'upload_date': '20210119',
21 # TODO: fix url _type result processing
22 # 'series': 'Op Interventie',
26 def _real_extract(self
, url
):
27 uuid
= self
._match
_id
(url
)
28 video
= self
._download
_json
(
29 'https://omc4vm23offuhaxx6hekxtzspi.appsync-api.eu-west-1.amazonaws.com/graphql',
32 getComponent(type: Video, uuid: "%s") {
46 'x-api-key': 'da2-lz2cab4tfnah3mve6wiye4n77e',
47 })['data']['getComponent']
52 'title': video
.get('title'),
53 'url': 'http://mychannels.video/embed/%d' % video
['myChannelsVideo'],
54 'description': video
.get('description'),
55 'timestamp': parse_iso8601(video
.get('publishedAt')),
56 'duration': int_or_none(video
.get('duration')),
57 'series': try_get(video
, lambda x
: x
['program']['title']),
58 'ie_key': 'Medialaan',