]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/videopremium.py
4 from .common
import InfoExtractor
7 class VideoPremiumIE(InfoExtractor
):
8 _VALID_URL
= r
'(?:https?://)?(?:www\.)?videopremium\.tv/(?P<id>\w+)(?:/.*)?'
10 u
'url': u
'http://videopremium.tv/4w7oadjsf156',
11 u
'file': u
'4w7oadjsf156.f4v',
13 u
"title": u
"youtube-dl_test_video____a_________-BaW_jenozKc.mp4.mp4"
16 u
'skip_download': True,
20 def _real_extract(self
, url
):
21 mobj
= re
.match(self
._VALID
_URL
, url
)
23 video_id
= mobj
.group('id')
24 webpage_url
= 'http://videopremium.tv/' + video_id
25 webpage
= self
._download
_webpage
(webpage_url
, video_id
)
27 self
.report_extraction(video_id
)
29 video_title
= self
._html
_search
_regex
(r
'<h2(?:.*?)>\s*(.+?)\s*<',
30 webpage
, u
'video title')
34 'url': "rtmp://e%d.md.iplay.md/play" % random
.randint(1, 16),
35 'play_path': "mp4:%s.f4v" % video_id
,
36 'page_url': "http://videopremium.tv/" + video_id
,
37 'player_url': "http://videopremium.tv/uplayer/uppod.swf",