ÿØÿà 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/ |
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( parse_duration, parse_iso8601, ) class GodTubeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?godtube\.com/watch/\?v=(?P<id>[\da-zA-Z]+)' _TESTS = [ { 'url': 'https://www.godtube.com/watch/?v=0C0CNNNU', 'md5': '77108c1e4ab58f48031101a1a2119789', 'info_dict': { 'id': '0C0CNNNU', 'ext': 'mp4', 'title': 'Woman at the well.', 'duration': 159, 'timestamp': 1205712000, 'uploader': 'beverlybmusic', 'upload_date': '20080317', 'thumbnail': r're:^https?://.*\.jpg$', }, }, ] def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) video_id = mobj.group('id') config = self._download_xml( 'http://www.godtube.com/resource/mediaplayer/%s.xml' % video_id.lower(), video_id, 'Downloading player config XML') video_url = config.find('file').text uploader = config.find('author').text timestamp = parse_iso8601(config.find('date').text) duration = parse_duration(config.find('duration').text) thumbnail = config.find('image').text media = self._download_xml( 'http://www.godtube.com/media/xml/?v=%s' % video_id, video_id, 'Downloading media XML') title = media.find('title').text return { 'id': video_id, 'url': video_url, 'title': title, 'thumbnail': thumbnail, 'timestamp': timestamp, 'uploader': uploader, 'duration': duration, }