Browse Source

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

totalwebcasting
Yen Chi Hsuan 10 years ago
parent
commit
a662163fd5
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      youtube_dl/extractor/theplatform.py

+ 3
- 1
youtube_dl/extractor/theplatform.py View File

@ -139,7 +139,9 @@ class ThePlatformIE(InfoExtractor):
formats = self._extract_f4m_formats(f4m_url, video_id) formats = self._extract_f4m_formats(f4m_url, video_id)
else: else:
formats = [] 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: if switch is not None:
base_url = head.find(_x('smil:meta')).attrib['base'] base_url = head.find(_x('smil:meta')).attrib['base']
for f in switch.findall(_x('smil:video')): for f in switch.findall(_x('smil:video')):


Loading…
Cancel
Save