- title = re.sub(r'\s+', ' ', self._html_search_regex(
- r'(?s)<(?:h1|div) class="module-title"[^>]*>(.*?)</(?:h1|div)>',
- webpage, 'title'))
- description = self._html_search_meta('description', webpage, 'description')
-
- base_url = self._search_regex(
- r'var\s+server\s*=\s*"([^"]+)\"', webpage, 'server URL')
-
- xml_url = base_url + video_id + '.xml'
- idoc = self._download_xml(xml_url, video_id)
-
- formats = [
- {
- 'format_id': n.tag.rpartition('type')[2],
- 'url': base_url + n.find('./filename').text,
- 'width': int(n.find('./width').text),
- 'height': int(n.find('./height').text),
- 'abr': int(n.find('./audiobitrate').text),
- 'vbr': int(n.find('./videobitrate').text),
- 'vcodec': n.find('./codec').text,
- 'acodec': 'MP4A',
- }
- for n in list(idoc)
- # Blacklist type 6, it's extremely LQ and not available on the same server
- if n.tag.startswith('type') and n.tag != 'type6'
- ]
- duration = float(idoc[0].findall('./duration')[0].text)
-
- self._sort_formats(formats)
+ video_data = self._parse_json(self._webpage_read_content(
+ handle, metadata_url, video_id), video_id)
+ title = video_data['title']
+ nexx_id = video_data['nexxOmniaId']
+ domain_id = video_data.get('nexxOmniaDomain') or '748'