aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-04-08 21:03:11 +0600
committerSergey M․ <dstftw@gmail.com>2015-04-08 21:03:11 +0600
commitaef8fdba1172d60983ba9685249c03b66e7a94f0 (patch)
tree259b527447e610e6874aa6c43e356f7c781f726e /youtube_dl/extractor
parent0a1603634bcf799eeb769d95b6e716e66123b77f (diff)
[theplatform] Allow <par> without <swtich> at all
Bare `wget` on http://link.theplatform.com/s/kYEXFC/22d_qsQ6MIRTl results in an XML without <switch> at all but with <par> and <video> inside it. Let's handle this possible outcome as well.
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/theplatform.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/extractor/theplatform.py b/youtube_dl/extractor/theplatform.py
index bcddd23e4..2d2178331 100644
--- a/youtube_dl/extractor/theplatform.py
+++ b/youtube_dl/extractor/theplatform.py
@@ -142,6 +142,8 @@ class ThePlatformIE(InfoExtractor):
switch = body.find(_x('smil:switch'))
if switch is None:
switch = body.find(_x('smil:par//smil:switch'))
+ if switch is None:
+ switch = body.find(_x('smil:par'))
if switch is not None:
base_url = head.find(_x('smil:meta')).attrib['base']
for f in switch.findall(_x('smil:video')):