]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/vupload.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
13 class VuploadIE(InfoExtractor
):
14 _VALID_URL
= r
'https://vupload\.com/v/(?P<id>[a-z0-9]+)'
16 'url': 'https://vupload.com/v/u28d0pl2tphy',
17 'md5': '9b42a4a193cca64d80248e58527d83c8',
21 'description': 'md5:e9e6c0045c78cbf0d5bb19a55ce199fb',
22 'title': 'md5:e9e6c0045c78cbf0d5bb19a55ce199fb',
26 def _real_extract(self
, url
):
27 video_id
= self
._match
_id
(url
)
28 webpage
= self
._download
_webpage
(url
, video_id
)
30 title
= self
._html
_search
_regex
(r
'<title>(.+?)</title>', webpage
, 'title')
31 video_e
= self
._html
_search
_regex
(r
'\|([a-z0-9]{60})\|', webpage
, 'video')
32 video_url
= f
'https://wurize.megaupload.to/{video_e}/v.mp4'
33 duration
= parse_duration(self
._html
_search
_regex
(
34 r
'<i\s*class=["\']fad\s
*fa
-clock
["\']></i>\s*([\d:]+)\s*</div>', webpage, 'duration', fatal=False))
35 filesize_approx = parse_filesize(self._html_search_regex(
36 r'<i\s*class=["\']fad\s
*fa
-save
["\']></i>\s*([^<]+)\s*</div>', webpage, 'filesize', fatal=False))
37 extra_video_info = extract_attributes(self._html_search_regex(
38 r'(<video[^>]+>)', webpage, 'video_info', fatal=False))
39 description = self._html_search_meta('description', webpage)
45 'filesize_approx': filesize_approx,
46 'width': int_or_none(extra_video_info.get('width')),
47 'height': int_or_none(extra_video_info.get('height')),
48 'format_id': extra_video_info.get('height', '') + 'p',
50 'description': description,