|
|
@ -7,6 +7,7 @@ from ..utils import (
|
|
|
|
parse_filesize,
|
|
|
|
parse_filesize,
|
|
|
|
extract_attributes,
|
|
|
|
extract_attributes,
|
|
|
|
int_or_none,
|
|
|
|
int_or_none,
|
|
|
|
|
|
|
|
js_to_json
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -28,8 +29,11 @@ class VuploadIE(InfoExtractor):
|
|
|
|
webpage = self._download_webpage(url, video_id)
|
|
|
|
webpage = self._download_webpage(url, video_id)
|
|
|
|
|
|
|
|
|
|
|
|
title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title')
|
|
|
|
title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title')
|
|
|
|
video_e = self._html_search_regex(r'\|([a-z0-9]{60})\|', webpage, 'video')
|
|
|
|
video_json = self._parse_json(self._html_search_regex(r'sources:\s*(.+?]),', webpage, 'video'), video_id, transform_source=js_to_json)
|
|
|
|
video_url = f'https://wurize.megaupload.to/{video_e}/v.mp4'
|
|
|
|
formats = []
|
|
|
|
|
|
|
|
for source in video_json:
|
|
|
|
|
|
|
|
if source['src'].endswith('.m3u8'):
|
|
|
|
|
|
|
|
formats.extend(self._extract_m3u8_formats(source['src'], video_id, m3u8_id='hls'))
|
|
|
|
duration = parse_duration(self._html_search_regex(
|
|
|
|
duration = parse_duration(self._html_search_regex(
|
|
|
|
r'<i\s*class=["\']fad\s*fa-clock["\']></i>\s*([\d:]+)\s*</div>', webpage, 'duration', fatal=False))
|
|
|
|
r'<i\s*class=["\']fad\s*fa-clock["\']></i>\s*([\d:]+)\s*</div>', webpage, 'duration', fatal=False))
|
|
|
|
filesize_approx = parse_filesize(self._html_search_regex(
|
|
|
|
filesize_approx = parse_filesize(self._html_search_regex(
|
|
|
@ -40,7 +44,7 @@ class VuploadIE(InfoExtractor):
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
'id': video_id,
|
|
|
|
'id': video_id,
|
|
|
|
'url': video_url,
|
|
|
|
'formats': formats,
|
|
|
|
'duration': duration,
|
|
|
|
'duration': duration,
|
|
|
|
'filesize_approx': filesize_approx,
|
|
|
|
'filesize_approx': filesize_approx,
|
|
|
|
'width': int_or_none(extra_video_info.get('width')),
|
|
|
|
'width': int_or_none(extra_video_info.get('width')),
|
|
|
|