]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/videofyme.py
f75169041b4f958b9f345daba99a4a1ba575cf4e
3 from .common
import InfoExtractor
9 class VideofyMeIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(www\.videofy\.me/.+?|p\.videofy\.me/v)/(?P<id>\d+)(&|#|$)'
11 IE_NAME
= u
'videofy.me'
14 u
'url': u
'http://www.videofy.me/thisisvideofyme/1100701',
15 u
'file': u
'1100701.mp4',
16 u
'md5': u
'c77d700bdc16ae2e9f3c26019bd96143',
18 u
'title': u
'This is VideofyMe',
20 u
'uploader': u
'VideofyMe',
21 u
'uploader_id': u
'thisisvideofyme',
26 def _real_extract(self
, url
):
27 mobj
= re
.match(self
._VALID
_URL
, url
)
28 video_id
= mobj
.group('id')
29 config
= self
._download
_xml
('http://sunshine.videofy.me/?videoId=%s' % video_id
,
31 video
= config
.find('video')
32 sources
= video
.find('sources')
33 url_node
= next(node
for node
in [find_xpath_attr(sources
, 'source', 'id', 'HQ %s' % key
)
34 for key
in ['on', 'av', 'off']] if node
is not None)
35 video_url
= url_node
.find('url').text
37 return {'id': video_id
,
38 'title': video
.find('title').text
,
40 'ext': determine_ext(video_url
),
41 'thumbnail': video
.find('thumb').text
,
42 'description': video
.find('description').text
,
43 'uploader': config
.find('blog/name').text
,
44 'uploader_id': video
.find('identifier').text
,
45 'view_count': re
.search(r
'\d+', video
.find('views').text
).group(),