projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
778433c
)
[cbsnews] use find_xpath_attr
author
remitamine
<remitamine@gmail.com>
Thu, 18 Feb 2016 15:10:09 +0000
(16:10 +0100)
committer
remitamine
<remitamine@gmail.com>
Thu, 18 Feb 2016 15:10:09 +0000
(16:10 +0100)
youtube_dl/extractor/cbsnews.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/cbsnews.py
b/youtube_dl/extractor/cbsnews.py
index f0de73aebccf3fd1bea305f9fba086b34a228d17..7319ee1b734e6fc30e4cb681f66eb082ffb9622a 100644
(file)
--- a/
youtube_dl/extractor/cbsnews.py
+++ b/
youtube_dl/extractor/cbsnews.py
@@
-3,7
+3,10
@@
from __future__ import unicode_literals
from .common import InfoExtractor
from .theplatform import ThePlatformIE
from .common import InfoExtractor
from .theplatform import ThePlatformIE
-from ..utils import parse_duration
+from ..utils import (
+ parse_duration,
+ find_xpath_attr,
+)
class CBSNewsIE(ThePlatformIE):
class CBSNewsIE(ThePlatformIE):
@@
-47,7
+50,7
@@
class CBSNewsIE(ThePlatformIE):
]
def _parse_smil_subtitles(self, smil, namespace=None, subtitles_lang='en'):
]
def _parse_smil_subtitles(self, smil, namespace=None, subtitles_lang='en'):
- closed_caption_e =
smil.find(self._xpath_ns('.//param[@name=\'ClosedCaptionURL\']', namespace)
)
+ closed_caption_e =
find_xpath_attr(smil, self._xpath_ns('.//param', namespace), 'name', 'ClosedCaptionURL'
)
return {
'en': [{
'ext': 'ttml',
return {
'en': [{
'ext': 'ttml',