1 from .common
import InfoExtractor
9 class DumpertIE(InfoExtractor
):
11 (?P<protocol>https?)://(?:(?:www|legacy)\.)?dumpert\.nl/(?:
12 (?:mediabase|embed|item)/|
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,
60 'url': 'https://www.dumpert.nl/toppers/dag?selectedId=100086074_f5cef3ac',
61 'only_matching': True,
64 def _real_extract(self
, url
):
65 video_id
= self
._match
_id
(url
).replace('_', '/')
66 item
= self
._download
_json
(
67 'http://api-live.dumpert.nl/mobile_api/json/info/' + video_id
.replace('/', '_'),
70 media
= next(m
for m
in item
['media'] if m
.get('mediatype') == 'VIDEO')
72 quality
= qualities(['flv', 'mobile', 'tablet', '720p', '1080p'])
74 for variant
in media
.get('variants', []):
75 uri
= variant
.get('uri')
78 version
= variant
.get('version')
79 preference
= quality(version
)
80 if determine_ext(uri
) == 'm3u8':
81 formats
.extend(self
._extract
_m
3u8_formats
(
82 uri
, video_id
, 'mp4', m3u8_id
=version
, quality
=preference
))
87 'quality': preference
,
91 stills
= item
.get('stills') or {}
92 for t
in ('thumb', 'still'):
93 for s
in ('', '-medium', '-large'):
95 still_url
= stills
.get(still_id
)
103 stats
= item
.get('stats') or {}
108 'description': item
.get('description'),
109 'thumbnails': thumbnails
,
111 'duration': int_or_none(media
.get('duration')),
112 'like_count': int_or_none(stats
.get('kudos_total')),
113 'view_count': int_or_none(stats
.get('views_total')),