1 from __future__ import unicode_literals
5 from .common import InfoExtractor
12 class GodTubeIE(InfoExtractor):
13 _VALID_URL = r'https?://(?:www\.)?godtube\.com/watch/\?v=(?P<id>[\da-zA-Z]+)'
16 'url': 'https://www.godtube.com/watch/?v=0C0CNNNU',
17 'md5': '77108c1e4ab58f48031101a1a2119789',
21 'title': 'Woman at the well.',
23 'timestamp': 1205712000,
24 'uploader': 'beverlybmusic',
25 'upload_date': '20080317',
26 'thumbnail': r're:^https?://.*\.jpg$',
31 def _real_extract(self, url):
32 mobj = re.match(self._VALID_URL, url)
33 video_id = mobj.group('id')
35 config = self._download_xml(
36 'http://www.godtube.com/resource/mediaplayer/%s.xml' % video_id.lower(),
37 video_id, 'Downloading player config XML')
39 video_url = config.find('file').text
40 uploader = config.find('author').text
41 timestamp = parse_iso8601(config.find('date').text)
42 duration = parse_duration(config.find('duration').text)
43 thumbnail = config.find('image').text
45 media = self._download_xml(
46 'http://www.godtube.com/media/xml/?v=%s' % video_id, video_id, 'Downloading media XML')
48 title = media.find('title').text
54 'thumbnail': thumbnail,
55 'timestamp': timestamp,