1
0
Fork 0
mirror of https://gitlab.com/dstftw/youtube-dl.git synced 2020-11-16 09:42:26 +00:00

[mtvservices] Fix ext for RTMP streams

This commit is contained in:
Yen Chi Hsuan 2016-06-18 12:19:06 +08:00
parent c878e635de
commit a72df5f36f
No known key found for this signature in database
GPG key ID: 3FDDD575826C5C30

View file

@ -85,9 +85,10 @@ class MTVServicesInfoExtractor(InfoExtractor):
rtmp_video_url = rendition.find('./src').text
if rtmp_video_url.endswith('siteunavail.png'):
continue
new_url = self._transform_rtmp_url(rtmp_video_url)
formats.append({
'ext': ext,
'url': self._transform_rtmp_url(rtmp_video_url),
'ext': 'flv' if new_url.startswith('rtmp') else ext,
'url': new_url,
'format_id': rendition.get('bitrate'),
'width': int(rendition.get('width')),
'height': int(rendition.get('height')),