]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/godtube.py
1 from __future__
import unicode_literals
4 from .common
import InfoExtractor
11 class GodTubeIE(InfoExtractor
):
12 _VALID_URL
= r
'https?://(?:www\.)?godtube\.com/watch/\?v=(?P<id>[\da-zA-Z]+)'
15 'url': 'https://www.godtube.com/watch/?v=0C0CNNNU',
16 'md5': '77108c1e4ab58f48031101a1a2119789',
20 'title': 'Woman at the well.',
22 'timestamp': 1205712000,
23 'uploader': 'beverlybmusic',
24 'upload_date': '20080317',
25 'thumbnail': r
're:^https?://.*\.jpg$',
30 def _real_extract(self
, url
):
31 mobj
= self
._match
_valid
_url
(url
)
32 video_id
= mobj
.group('id')
34 config
= self
._download
_xml
(
35 'http://www.godtube.com/resource/mediaplayer/%s.xml' % video_id
.lower(),
36 video_id
, 'Downloading player config XML')
38 video_url
= config
.find('file').text
39 uploader
= config
.find('author').text
40 timestamp
= parse_iso8601(config
.find('date').text
)
41 duration
= parse_duration(config
.find('duration').text
)
42 thumbnail
= config
.find('image').text
44 media
= self
._download
_xml
(
45 'http://www.godtube.com/media/xml/?v=%s' % video_id
, video_id
, 'Downloading media XML')
47 title
= media
.find('title').text
53 'thumbnail': thumbnail
,
54 'timestamp': timestamp
,