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