- def _extract_video_formats(self, webpage, video_id, m3u8_entry_protocol):
- formats = []
- format_url_base = 'http' + self._html_search_regex(
- [
- r'file\s*:\s*"https?(://[^"]+)/playlist.m3u8',
- r'<a[^>]+href="rtsp(://[^"]+)"'
- ], webpage, 'format url')
- formats.extend(self._extract_mpd_formats(
- format_url_base + '/manifest.mpd',
- video_id, mpd_id='dash', fatal=False))
- formats.extend(self._extract_m3u8_formats(
- format_url_base + '/playlist.m3u8', video_id, 'mp4',
- m3u8_entry_protocol, m3u8_id='hls', fatal=False))
- formats.extend(self._extract_f4m_formats(
- format_url_base + '/manifest.f4m',
- video_id, f4m_id='hds', fatal=False))
- self._sort_formats(formats)
- return formats
-