for encoding in video_metadata.get('encodings', []):
if not encoding or not isinstance(encoding, dict):
continue
for encoding in video_metadata.get('encodings', []):
if not encoding or not isinstance(encoding, dict):
continue
if ext == 'm3u8':
formats.extend(self._extract_m3u8_formats(
video_url, video_id, 'mp4', entry_protocol='m3u8_native',
if ext == 'm3u8':
formats.extend(self._extract_m3u8_formats(
video_url, video_id, 'mp4', entry_protocol='m3u8_native',