]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/nuevo.py
1 from .common
import InfoExtractor
9 class NuevoBaseIE(InfoExtractor
):
10 def _extract_nuevo(self
, config_url
, video_id
, headers
={}):
11 config
= self
._download
_xml
(
12 config_url
, video_id
, transform_source
=lambda s
: s
.strip(),
15 title
= xpath_text(config
, './title', 'title', fatal
=True).strip()
16 video_id
= xpath_text(config
, './mediaid', default
=video_id
)
17 thumbnail
= xpath_text(config
, ['./image', './thumb'])
18 duration
= float_or_none(xpath_text(config
, './duration'))
21 for element_name
, format_id
in (('file', 'sd'), ('filehd', 'hd')):
22 video_url
= xpath_text(config
, element_name
)
26 'format_id': format_id
,
28 self
._check
_formats
(formats
, video_id
)
33 'thumbnail': thumbnail
,