- if fcfg['type'] == 'm3u8':
- formats.extend(self._extract_m3u8_formats(fcfg['file'], video_id))
+ media_url = fcfg.get('file')
+ if not media_url:
+ continue
+ if fcfg.get('type') == 'm3u8':
+ formats.extend(self._extract_m3u8_formats(
+ media_url, video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls'))