mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-22 20:20:09 +09:00
[jwplatform] Support DASH streams
This commit is contained in:
parent
fd15264172
commit
99ed78c79e
@ -6,6 +6,7 @@ Core
|
|||||||
--xattr-set-filesize (#9054)
|
--xattr-set-filesize (#9054)
|
||||||
|
|
||||||
Extractors
|
Extractors
|
||||||
|
+ [jwplatform] Support DASH streams in JWPlayer
|
||||||
* [jwplatform] Improve JWPlayer handling
|
* [jwplatform] Improve JWPlayer handling
|
||||||
* [dctp] Fix extraction (#10734)
|
* [dctp] Fix extraction (#10734)
|
||||||
+ [leeco] Recognize more Le Sports URLs (#10794)
|
+ [leeco] Recognize more Le Sports URLs (#10794)
|
||||||
|
@ -32,7 +32,8 @@ class JWPlatformBaseIE(InfoExtractor):
|
|||||||
return self._parse_jwplayer_data(
|
return self._parse_jwplayer_data(
|
||||||
jwplayer_data, video_id, *args, **kwargs)
|
jwplayer_data, video_id, *args, **kwargs)
|
||||||
|
|
||||||
def _parse_jwplayer_data(self, jwplayer_data, video_id=None, require_title=True, m3u8_id=None, rtmp_params=None, base_url=None):
|
def _parse_jwplayer_data(self, jwplayer_data, video_id=None, require_title=True,
|
||||||
|
m3u8_id=None, mpd_id=None, rtmp_params=None, base_url=None):
|
||||||
# JWPlayer backward compatibility: flattened playlists
|
# JWPlayer backward compatibility: flattened playlists
|
||||||
# https://github.com/jwplayer/jwplayer/blob/v7.4.3/src/js/api/config.js#L81-L96
|
# https://github.com/jwplayer/jwplayer/blob/v7.4.3/src/js/api/config.js#L81-L96
|
||||||
if 'playlist' not in jwplayer_data:
|
if 'playlist' not in jwplayer_data:
|
||||||
@ -63,6 +64,9 @@ class JWPlatformBaseIE(InfoExtractor):
|
|||||||
if source_type == 'hls' or ext == 'm3u8':
|
if source_type == 'hls' or ext == 'm3u8':
|
||||||
formats.extend(self._extract_m3u8_formats(
|
formats.extend(self._extract_m3u8_formats(
|
||||||
source_url, this_video_id, 'mp4', 'm3u8_native', m3u8_id=m3u8_id, fatal=False))
|
source_url, this_video_id, 'mp4', 'm3u8_native', m3u8_id=m3u8_id, fatal=False))
|
||||||
|
elif ext == 'mpd':
|
||||||
|
formats.extend(self._extract_mpd_formats(
|
||||||
|
source_url, this_video_id, mpd_id=mpd_id, fatal=False))
|
||||||
# https://github.com/jwplayer/jwplayer/blob/master/src/js/providers/default.js#L67
|
# https://github.com/jwplayer/jwplayer/blob/master/src/js/providers/default.js#L67
|
||||||
elif source_type.startswith('audio') or ext in ('oga', 'aac', 'mp3', 'mpeg', 'vorbis'):
|
elif source_type.startswith('audio') or ext in ('oga', 'aac', 'mp3', 'mpeg', 'vorbis'):
|
||||||
formats.append({
|
formats.append({
|
||||||
|
@ -43,7 +43,7 @@ class RudoIE(JWPlatformBaseIE):
|
|||||||
transform_source=lambda s: js_to_json(re.sub(r'encodeURI\([^)]+\)', '""', s)))
|
transform_source=lambda s: js_to_json(re.sub(r'encodeURI\([^)]+\)', '""', s)))
|
||||||
|
|
||||||
info_dict = self._parse_jwplayer_data(
|
info_dict = self._parse_jwplayer_data(
|
||||||
jwplayer_data, video_id, require_title=False, m3u8_id='hls')
|
jwplayer_data, video_id, require_title=False, m3u8_id='hls', mpd_id='dash')
|
||||||
|
|
||||||
info_dict.update({
|
info_dict.update({
|
||||||
'title': self._og_search_title(webpage),
|
'title': self._og_search_title(webpage),
|
||||||
|
Loading…
Reference in New Issue
Block a user