2 from __future__ import unicode_literals
4 from .common import InfoExtractor
7 class RTVNHIE(InfoExtractor):
8 _VALID_URL = r'https?://(?:www\.)?rtvnh\.nl/video/(?P<id>[0-9]+)'
10 'url': 'http://www.rtvnh.nl/video/131946',
11 'md5': '6e1d0ab079e2a00b6161442d3ceacfc1',
15 'title': 'Grote zoektocht in zee bij Zandvoort naar vermiste vrouw',
16 'thumbnail': 're:^https?:.*\.jpg$'
20 def _real_extract(self, url):
21 video_id = self._match_id(url)
22 meta = self._parse_json(self._download_webpage('http://www.rtvnh.nl/video/json?m=' + video_id, video_id), video_id)
23 formats = self._extract_smil_formats('http://www.rtvnh.nl/video/smil?m=' + video_id, video_id)
25 for item in meta['source']['fb']:
26 if item.get('type') == 'hls':
27 formats.extend(self._extract_m3u8_formats(item['file'], video_id, ext='mp4', entry_protocol='m3u8_native'))
28 elif item.get('type') == '':
29 formats.append({'url': item['file']})
33 'title': meta['title'].strip(),
34 'thumbnail': meta['image'],