mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-25 19:52:11 +00:00
[jwplatform] Don't fail with RTMP URLs without mp4:, mp3: or flv:
This commit is contained in:
parent
661d46b28f
commit
115c65793a
1 changed files with 9 additions and 6 deletions
|
@ -34,13 +34,16 @@ class JWPlatformBaseIE(InfoExtractor):
|
||||||
'height': int_or_none(source.get('height')),
|
'height': int_or_none(source.get('height')),
|
||||||
}
|
}
|
||||||
if source_url.startswith('rtmp'):
|
if source_url.startswith('rtmp'):
|
||||||
|
a_format['ext'] = 'flv',
|
||||||
|
|
||||||
# See com/longtailvideo/jwplayer/media/RTMPMediaProvider.as
|
# See com/longtailvideo/jwplayer/media/RTMPMediaProvider.as
|
||||||
# of jwplayer.flash.swf
|
# of jwplayer.flash.swf
|
||||||
rtmp_url, prefix, play_path = re.split(
|
rtmp_url_parts = re.split(
|
||||||
r'((?:mp4|mp3|flv):)', source_url, 1)
|
r'((?:mp4|mp3|flv):)', source_url, 1)
|
||||||
|
if len(rtmp_url_parts) == 3:
|
||||||
|
rtmp_url, prefix, play_path = rtmp_url_parts
|
||||||
a_format.update({
|
a_format.update({
|
||||||
'url': rtmp_url,
|
'url': rtmp_url,
|
||||||
'ext': 'flv',
|
|
||||||
'play_path': prefix + play_path,
|
'play_path': prefix + play_path,
|
||||||
})
|
})
|
||||||
if rtmp_params:
|
if rtmp_params:
|
||||||
|
|
Loading…
Reference in a new issue