5 from .common
import InfoExtractor
8 class BigflixIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:www\.)?bigflix\.com/.+/(?P<id>[0-9]+)'
12 'url': 'http://www.bigflix.com/Tamil-movies/Drama-movies/Madarasapatinam/16070',
16 'title': 'Madarasapatinam',
17 'description': 'md5:9f0470b26a4ba8e824c823b5d95c2f6b',
18 'formats': 'mincount:2',
21 'skip_download': True,
25 'url': 'http://www.bigflix.com/Malayalam-movies/Drama-movies/Indian-Rupee/15967',
26 'only_matching': True,
29 def _real_extract(self
, url
):
30 video_id
= self
._match
_id
(url
)
32 webpage
= self
._download
_webpage
(url
, video_id
)
34 title
= self
._html
_search
_regex
(
35 r
'<div[^>]+class=["\']pagetitle
["\'][^>]*>(.+?)</div>',
38 def decode_url(quoted_b64_url):
39 return base64.b64decode(urllib.parse.unquote(
40 quoted_b64_url)).decode('utf-8')
43 for height, encoded_url in re.findall(
44 r'ContentURL_(\d{3,4})[pP][^=]+=([^&]+)', webpage):
45 video_url = decode_url(encoded_url)
48 'format_id': f'{height}p',
49 'height': int(height),
51 if video_url.startswith('rtmp'):
55 file_url = self._search_regex(
56 r'file=([^&]+)', webpage, 'video url', default=None)
58 video_url = decode_url(file_url)
59 if all(f['url'] != video_url for f in formats):
61 'url': decode_url(file_url),
64 description = self._html_search_meta('description', webpage)
69 'description': description,