aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/mtv.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-06-18 12:19:06 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-06-18 12:19:06 +0800
commita72df5f36feddaffbcfa35e3415562509a9f67b4 (patch)
treefc5e925420b72e9ae242a9ef9d412e36fbc09037 /youtube_dl/extractor/mtv.py
parentc878e635de1563ded54b2504104e94cd59c70b55 (diff)
[mtvservices] Fix ext for RTMP streams
Diffstat (limited to 'youtube_dl/extractor/mtv.py')
-rw-r--r--youtube_dl/extractor/mtv.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/mtv.py b/youtube_dl/extractor/mtv.py
index 8a638a47c..dd0639589 100644
--- a/youtube_dl/extractor/mtv.py
+++ b/youtube_dl/extractor/mtv.py
@@ -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')),