ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /usr/lib/python2.7/site-packages/youtube_dl/extractor/ |
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( float_or_none, xpath_text ) class NuevoBaseIE(InfoExtractor): def _extract_nuevo(self, config_url, video_id, headers={}): config = self._download_xml( config_url, video_id, transform_source=lambda s: s.strip(), headers=headers) title = xpath_text(config, './title', 'title', fatal=True).strip() video_id = xpath_text(config, './mediaid', default=video_id) thumbnail = xpath_text(config, ['./image', './thumb']) duration = float_or_none(xpath_text(config, './duration')) formats = [] for element_name, format_id in (('file', 'sd'), ('filehd', 'hd')): video_url = xpath_text(config, element_name) if video_url: formats.append({ 'url': video_url, 'format_id': format_id, }) self._check_formats(formats, video_id) return { 'id': video_id, 'title': title, 'thumbnail': thumbnail, 'duration': duration, 'formats': formats }