1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-12-21 18:02:57 +08:00

[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.
This commit is contained in:
Sergey M․ 2015-04-08 21:03:11 +06:00
parent 0a1603634b
commit aef8fdba11

View File

@ -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')):