- data_url = 'http://teamcoco.com/cvp/2.0/%s.xml' % video_id
- data = self._download_xml(
- data_url, display_id, 'Downloading data webpage')
+ if not preload:
+ preload = ''.join(re.findall(r'this\.push\("([^"]+)"\);', webpage))
+
+ if not preload:
+ preload = self._html_search_regex([
+ r'player,\[?"([^"]+)"\]?', r'player.init\(\[?"([^"]+)"\]?\)'
+ ], webpage.replace('","', ''), 'preload data', default=None)
+
+ if not preload:
+ raise ExtractorError(
+ 'Preload information could not be extracted', expected=True)
+
+ data = self._parse_json(
+ base64.b64decode(preload.encode('ascii')).decode('utf-8'), video_id)