aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/common.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-08-19 23:11:25 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-08-19 23:11:25 +0800
commitf877c6ae5a6e252d6904f90d597479451d2107aa (patch)
tree153147dc6e1f6ddd064d363450cfb60b7b38fc20 /youtube_dl/extractor/common.py
parenta01da8bbf83dfd4f87e3fdd105b9f7c850e76cad (diff)
[theplatform] Use InfoExtractor._parse_smil_formats()
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r--youtube_dl/extractor/common.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 65835d257..ac12be933 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -1052,7 +1052,7 @@ class InfoExtractor(object):
return self._search_regex(
r'(?i)^{([^}]+)?}smil$', smil.tag, 'namespace', default=None)
- def _parse_smil_formats(self, smil, smil_url, video_id, namespace=None, f4m_params=None):
+ def _parse_smil_formats(self, smil, smil_url, video_id, namespace=None, f4m_params=None, transform_rtmp_url=None):
base = smil_url
for meta in smil.findall(self._xpath_ns('./head/meta', namespace)):
b = meta.get('base') or meta.get('httpBase')
@@ -1091,6 +1091,12 @@ class InfoExtractor(object):
'width': width,
'height': height,
})
+ if transform_rtmp_url:
+ streamer, src = transform_rtmp_url(streamer, src)
+ formats[-1].update({
+ 'url': streamer,
+ 'play_path': src,
+ })
continue
src_url = src if src.startswith('http') else compat_urlparse.urljoin(base, src)