aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/cbsnews.py
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2016-02-18 16:10:09 +0100
committerremitamine <remitamine@gmail.com>2016-02-18 16:10:09 +0100
commit8b809a079aa5b55d39029ee00c706e3c67ed311a (patch)
treef9ab68725e75eaed0ab9d89def0d1586cbb8d6fa /youtube_dl/extractor/cbsnews.py
parent778433cb90064a3fbe21afb722c787841e85ddf4 (diff)
downloadyoutube-dl-8b809a079aa5b55d39029ee00c706e3c67ed311a.tar.xz
[cbsnews] use find_xpath_attr
Diffstat (limited to 'youtube_dl/extractor/cbsnews.py')
-rw-r--r--youtube_dl/extractor/cbsnews.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dl/extractor/cbsnews.py b/youtube_dl/extractor/cbsnews.py
index f0de73aeb..7319ee1b7 100644
--- 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 ..utils import parse_duration
+from ..utils import (
+ parse_duration,
+ find_xpath_attr,
+)
class CBSNewsIE(ThePlatformIE):
@@ -47,7 +50,7 @@ class CBSNewsIE(ThePlatformIE):
]
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',