mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 11:42:43 +01:00
[cbsnews] use find_xpath_attr
This commit is contained in:
parent
778433cb90
commit
8b809a079a
@ -3,7 +3,10 @@
|
|||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from .theplatform import ThePlatformIE
|
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 {
|
return {
|
||||||
'en': [{
|
'en': [{
|
||||||
'ext': 'ttml',
|
'ext': 'ttml',
|
||||||
|
Loading…
Reference in New Issue
Block a user