logo

youtube-dl

[mirror] Download/Watch videos from video hosters
commit: a662163fd5b3c9b1221b8aeaf54ed9083af8574f
parent bd7a6478a2db228c7325a48e13e0e699502f56f4
Author: Yen Chi Hsuan <yan12125@gmail.com>
Date:   Wed,  8 Apr 2015 20:21:34 +0800

[theplatform] Rework on <switch> inside <par>

Diffstat:

Myoutube_dl/extractor/theplatform.py4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/youtube_dl/extractor/theplatform.py b/youtube_dl/extractor/theplatform.py @@ -139,7 +139,9 @@ class ThePlatformIE(InfoExtractor): formats = self._extract_f4m_formats(f4m_url, video_id) else: formats = [] - switch = body.find(_x('.//smil:switch')) + switch = body.find(_x('smil:switch')) + if switch is None: + switch = body.find(_x('smil:par//smil:switch')) if switch is not None: base_url = head.find(_x('smil:meta')).attrib['base'] for f in switch.findall(_x('smil:video')):