[generic] Make generic extractor use hlsnative for m3u8 files
This commit is contained in:
parent
7cfc1e2a10
commit
d5037ae107
@ -1379,7 +1379,7 @@ class GenericIE(InfoExtractor):
|
|||||||
if m:
|
if m:
|
||||||
format_id = m.group('format_id')
|
format_id = m.group('format_id')
|
||||||
if format_id.endswith('mpegurl'):
|
if format_id.endswith('mpegurl'):
|
||||||
formats = self._extract_m3u8_formats(url, video_id, 'mp4')
|
formats = self._extract_m3u8_formats(url, video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls')
|
||||||
elif format_id == 'f4m':
|
elif format_id == 'f4m':
|
||||||
formats = self._extract_f4m_formats(url, video_id)
|
formats = self._extract_f4m_formats(url, video_id)
|
||||||
else:
|
else:
|
||||||
@ -1415,7 +1415,7 @@ class GenericIE(InfoExtractor):
|
|||||||
|
|
||||||
# Is it an M3U playlist?
|
# Is it an M3U playlist?
|
||||||
if first_bytes.startswith(b'#EXTM3U'):
|
if first_bytes.startswith(b'#EXTM3U'):
|
||||||
info_dict['formats'] = self._extract_m3u8_formats(url, video_id, 'mp4')
|
info_dict['formats'] = self._extract_m3u8_formats(url, video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls')
|
||||||
self._sort_formats(info_dict['formats'])
|
self._sort_formats(info_dict['formats'])
|
||||||
return info_dict
|
return info_dict
|
||||||
|
|
||||||
@ -2167,7 +2167,7 @@ class GenericIE(InfoExtractor):
|
|||||||
elif ext == 'xspf':
|
elif ext == 'xspf':
|
||||||
return self.playlist_result(self._extract_xspf_playlist(video_url, video_id), video_id)
|
return self.playlist_result(self._extract_xspf_playlist(video_url, video_id), video_id)
|
||||||
elif ext == 'm3u8':
|
elif ext == 'm3u8':
|
||||||
entry_info_dict['formats'] = self._extract_m3u8_formats(video_url, video_id, ext='mp4')
|
entry_info_dict['formats'] = self._extract_m3u8_formats(video_url, video_id, ext='mp4', entry_protocol='m3u8_native', m3u8_id='hls')
|
||||||
elif ext == 'mpd':
|
elif ext == 'mpd':
|
||||||
entry_info_dict['formats'] = self._extract_mpd_formats(video_url, video_id)
|
entry_info_dict['formats'] = self._extract_mpd_formats(video_url, video_id)
|
||||||
elif ext == 'f4m':
|
elif ext == 'f4m':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user