1 from .common
import InfoExtractor
2 from ..utils
import float_or_none
, xpath_text
5 class NuevoBaseIE(InfoExtractor
):
6 def _extract_nuevo(self
, config_url
, video_id
, headers
={}):
7 config
= self
._download
_xml
(
8 config_url
, video_id
, transform_source
=lambda s
: s
.strip(),
11 title
= xpath_text(config
, './title', 'title', fatal
=True).strip()
12 video_id
= xpath_text(config
, './mediaid', default
=video_id
)
13 thumbnail
= xpath_text(config
, ['./image', './thumb'])
14 duration
= float_or_none(xpath_text(config
, './duration'))
17 for element_name
, format_id
in (('file', 'sd'), ('filehd', 'hd')):
18 video_url
= xpath_text(config
, element_name
)
22 'format_id': format_id
,
24 self
._check
_formats
(formats
, video_id
)
29 'thumbnail': thumbnail
,