]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/videofyme.py
94f9e9be94f9a420fd0207339085cbc35aba6805
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
10 class VideofyMeIE(InfoExtractor
):
11 _VALID_URL
= r
'https?://(?:www\.videofy\.me/.+?|p\.videofy\.me/v)/(?P<id>\d+)(&|#|$)'
12 IE_NAME
= 'videofy.me'
15 'url': 'http://www.videofy.me/thisisvideofyme/1100701',
16 'md5': 'c77d700bdc16ae2e9f3c26019bd96143',
20 'title': 'This is VideofyMe',
22 'uploader': 'VideofyMe',
23 'uploader_id': 'thisisvideofyme',
29 def _real_extract(self
, url
):
30 video_id
= self
._match
_id
(url
)
31 config
= self
._download
_xml
('http://sunshine.videofy.me/?videoId=%s' % video_id
,
33 video
= config
.find('video')
34 sources
= video
.find('sources')
35 url_node
= next(node
for node
in [find_xpath_attr(sources
, 'source', 'id', 'HQ %s' % key
)
36 for key
in ['on', 'av', 'off']] if node
is not None)
37 video_url
= url_node
.find('url').text
38 view_count
= int_or_none(self
._search
_regex
(
39 r
'([0-9]+)', video
.find('views').text
, 'view count', fatal
=False))
43 'title': video
.find('title').text
,
45 'thumbnail': video
.find('thumb').text
,
46 'description': video
.find('description').text
,
47 'uploader': config
.find('blog/name').text
,
48 'uploader_id': video
.find('identifier').text
,
49 'view_count': view_count
,