1 from .common
import InfoExtractor
9 class DumpertIE(InfoExtractor
):
11 (?P<protocol>https?)://(?:(?:www|legacy)\.)?dumpert\.nl(?:
12 /(?:mediabase|embed|item)/|
13 (?:/toppers|/latest|/?)\?selectedId=
14 )(?P<id>[0-9]+[/_][0-9a-zA-Z]+)'''
16 'url': 'https://www.dumpert.nl/item/6646981_951bc60f',
17 'md5': '1b9318d7d5054e7dcb9dc7654f21d643',
19 'id': '6646981/951bc60f',
21 'title': 'Ik heb nieuws voor je',
22 'description': 'Niet schrikken hoor',
23 'thumbnail': r
're:^https?://.*\.jpg$',
29 'url': 'https://www.dumpert.nl/embed/6675421_dc440fe7',
30 'only_matching': True,
32 'url': 'http://legacy.dumpert.nl/mediabase/6646981/951bc60f',
33 'only_matching': True,
35 'url': 'http://legacy.dumpert.nl/embed/6675421/dc440fe7',
36 'only_matching': True,
38 'url': 'https://www.dumpert.nl/item/100031688_b317a185',
40 'id': '100031688/b317a185',
42 'title': 'Epic schijnbeweging',
43 'description': '<p>Die zag je niet eh</p>',
44 'thumbnail': r
're:^https?://.*\.(?:jpg|png)$',
49 'params': {'skip_download': 'm3u8'}
51 'url': 'https://www.dumpert.nl/toppers?selectedId=100031688_b317a185',
52 'only_matching': True,
54 'url': 'https://www.dumpert.nl/latest?selectedId=100031688_b317a185',
55 'only_matching': True,
57 'url': 'https://www.dumpert.nl/?selectedId=100031688_b317a185',
58 'only_matching': True,
61 def _real_extract(self
, url
):
62 video_id
= self
._match
_id
(url
).replace('_', '/')
63 item
= self
._download
_json
(
64 'http://api-live.dumpert.nl/mobile_api/json/info/' + video_id
.replace('/', '_'),
67 media
= next(m
for m
in item
['media'] if m
.get('mediatype') == 'VIDEO')
69 quality
= qualities(['flv', 'mobile', 'tablet', '720p', '1080p'])
71 for variant
in media
.get('variants', []):
72 uri
= variant
.get('uri')
75 version
= variant
.get('version')
76 preference
= quality(version
)
77 if determine_ext(uri
) == 'm3u8':
78 formats
.extend(self
._extract
_m
3u8_formats
(
79 uri
, video_id
, 'mp4', m3u8_id
=version
, quality
=preference
))
84 'quality': preference
,
88 stills
= item
.get('stills') or {}
89 for t
in ('thumb', 'still'):
90 for s
in ('', '-medium', '-large'):
92 still_url
= stills
.get(still_id
)
100 stats
= item
.get('stats') or {}
105 'description': item
.get('description'),
106 'thumbnails': thumbnails
,
108 'duration': int_or_none(media
.get('duration')),
109 'like_count': int_or_none(stats
.get('kudos_total')),
110 'view_count': int_or_none(stats
.get('views_total')),