- re.sub(r'm3u8|hlsvod|hls|f4m', 'mp4', secure_m3u8),
- video_id, 'Downloading mp4 JSON')
- mp4_url_basename = url_basename(mp4_url)
- for m3u8_format in m3u8_formats:
- mobj = re.search('/([^/]+)/index\.m3u8', m3u8_format['url'])
- if mobj:
- http_format = m3u8_format.copy()
- video_url = mp4_url.replace(mp4_url_basename, mobj.group(1))
- if not self._is_valid_url(video_url, video_id):
+ re.sub(r'm3u8|hlsvod|hls|f4m', 'mp4s', secure_m3u8),
+ video_id, 'Downloading mp4 JSON', fatal=False)
+ if mp4_data:
+ for format_id, format_url in mp4_data.get('data', {}).items():
+ if not isinstance(format_url, compat_str):