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