]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[theplatform] Rework on <switch> inside <par>
authorYen Chi Hsuan <yan12125@gmail.com>
Wed, 8 Apr 2015 12:21:34 +0000 (20:21 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Wed, 8 Apr 2015 12:21:34 +0000 (20:21 +0800)
youtube_dl/extractor/theplatform.py

index a7d0604590734fcee9a072b0736b821359fb51c1..bcddd23e4b85d3e0f33bb5b8267e4c616c8a0296 100644 (file)
@@ -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')):