+ fmt_json = self._download_json(
+ request, video_id, 'Downloading windows video JSON')
+
+ result = fmt_json.get('resultDes')
+ if result.lower() != 'ok':
+ raise ExtractorError(
+ '%s returned error: %s' % (self.IE_NAME, result), expected=True)
+
+ for format_id, video_url in fmt_json['resultObject'].items():
+ if format_id == 'token' or not video_url.startswith('http'):
+ continue
+ if 'geodeswowsmpra3player' in video_url:
+ # f4m_path = video_url.split('smil:', 1)[-1].split('free_', 1)[0]
+ # f4m_url = 'http://drg.antena3.com/{0}hds/es/sd.f4m'.format(f4m_path)
+ # this videos are protected by DRM, the f4m downloader doesn't support them
+ continue
+ video_url_hd = video_url.replace('free_es', 'es')
+ formats.extend(self._extract_f4m_formats(
+ video_url_hd[:-9] + '/manifest.f4m', video_id, f4m_id='hds',
+ fatal=False))
+ formats.extend(self._extract_mpd_formats(
+ video_url_hd[:-9] + '/manifest.mpd', video_id, mpd_id='dash',
+ fatal=False))
+ self._sort_formats(formats)