1 from __future__ import unicode_literals
5 from .common import InfoExtractor
8 class RtlXlIE(InfoExtractor):
10 _VALID_URL = r'https?://www\.rtlxl\.nl/#!/[^/]+/(?P<uuid>[^/?]+)'
13 'url': 'http://www.rtlxl.nl/#!/rtl-nieuws-132237/6e4203a6-0a5e-3596-8424-c599a59e0677',
15 'id': '6e4203a6-0a5e-3596-8424-c599a59e0677',
17 'title': 'RTL Nieuws - Laat',
18 'description': 'Dagelijks het laatste nieuws uit binnen- en '
19 'buitenland. Voor nog meer nieuws kunt u ook gebruikmaken van '
21 'timestamp': 1408051800,
22 'upload_date': '20140814',
25 # We download the first bytes of the first fragment, it can't be
26 # processed by the f4m downloader beacuse it isn't complete
27 'skip_download': True,
31 def _real_extract(self, url):
32 mobj = re.match(self._VALID_URL, url)
33 uuid = mobj.group('uuid')
35 info = self._download_json(
36 'http://www.rtl.nl/system/s4m/vfd/version=2/uuid=%s/fmt=flash/' % uuid,
39 material = info['material'][0]
40 episode_info = info['episodes'][0]
42 f4m_url = 'http://manifest.us.rtl.nl' + material['videopath']
43 progname = info['abstracts'][0]['name']
44 subtitle = material['title'] or info['episodes'][0]['name']
48 'title': '%s - %s' % (progname, subtitle),
49 'formats': self._extract_f4m_formats(f4m_url, uuid),
50 'timestamp': material['original_date'],
51 'description': episode_info['synopsis'],