]>
jfr.im git - yt-dlp.git/blob - youtube_dl/extractor/dumpert.py
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
9 class DumpertIE(InfoExtractor
):
10 _VALID_URL
= (r
'https?://(?:www\.)?dumpert\.nl/mediabase/'
11 r
'(?P<id>[0-9]+/[0-9a-zA-Z]+)/?.*')
13 'url': 'http://www.dumpert.nl/mediabase/6646981/951bc60f/',
14 'md5': '1b9318d7d5054e7dcb9dc7654f21d643',
16 'id': '6646981/951bc60f',
18 'title': 'Ik heb nieuws voor je',
19 'description': 'Niet schrikken hoor'
23 def _real_extract(self
, url
):
24 video_id
= self
._match
_id
(url
)
25 webpage
= self
._download
_webpage
(url
, video_id
)
27 title
= self
._html
_search
_meta
('title', webpage
)
28 description
= self
._html
_search
_meta
('description', webpage
)
30 files_base64
= self
._html
_search
_regex
(r
'data-files="(.*?)"',
33 files_json
= base64
.b64decode(files_base64
).decode('iso-8859-1')
34 files
= self
._parse
_json
(files_json
, video_id
)
36 format_names
= ['flv', 'mobile', 'tablet', '720p']
37 formats
= [{'format_id': name
,
38 'url': files
[name
].replace(r
'\/', '/')}
39 for name
in format_names
45 'description': description
,