aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-04-08 22:27:25 +0600
committerSergey M․ <dstftw@gmail.com>2015-04-08 22:27:25 +0600
commit372f08c99057b6a994c72cf2591e184231b3e850 (patch)
treeb8071778b73e85b58bf84348abe1b6010f9b632c /youtube_dl
parentdd29eb7f816bae7cf7807db9f26b7f5621b8d557 (diff)
[theplatform] Fix for python 2.6
At least single depth level extraction...
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/theplatform.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dl/extractor/theplatform.py b/youtube_dl/extractor/theplatform.py
index 2d2178331..50c51d825 100644
--- a/youtube_dl/extractor/theplatform.py
+++ b/youtube_dl/extractor/theplatform.py
@@ -42,8 +42,8 @@ class ThePlatformIE(InfoExtractor):
# rtmp download
'skip_download': True,
},
- # from http://www.cnet.com/videos/tesla-model-s-a-second-step-towards-a-cleaner-motoring-future/
}, {
+ # from http://www.cnet.com/videos/tesla-model-s-a-second-step-towards-a-cleaner-motoring-future/
'url': 'http://link.theplatform.com/s/kYEXFC/22d_qsQ6MIRT',
'info_dict': {
'id': '22d_qsQ6MIRT',
@@ -128,7 +128,7 @@ class ThePlatformIE(InfoExtractor):
head = meta.find(_x('smil:head'))
body = meta.find(_x('smil:body'))
- f4m_node = body.find(_x('smil:seq//smil:video'))
+ f4m_node = body.find(_x('smil:seq//smil:video')) or body.find(_x('smil:seq/smil:video'))
if f4m_node is not None and '.f4m' in f4m_node.attrib['src']:
f4m_url = f4m_node.attrib['src']
if 'manifest.f4m?' not in f4m_url:
@@ -141,7 +141,7 @@ class ThePlatformIE(InfoExtractor):
formats = []
switch = body.find(_x('smil:switch'))
if switch is None:
- switch = body.find(_x('smil:par//smil:switch'))
+ switch = body.find(_x('smil:par//smil:switch')) or body.find(_x('smil:par/smil:switch'))
if switch is None:
switch = body.find(_x('smil:par'))
if switch is not None:
@@ -162,7 +162,7 @@ class ThePlatformIE(InfoExtractor):
'vbr': vbr,
})
else:
- switch = body.find(_x('smil:seq//smil:switch'))
+ switch = body.find(_x('smil:seq//smil:switch')) or body.find(_x('smil:seq/smil:switch'))
for f in switch.findall(_x('smil:video')):
attr = f.attrib
vbr = int(attr['system-bitrate']) // 1000