3 from .common
import InfoExtractor
6 compat_urllib_parse_unquote
,
10 class BigflixIE(InfoExtractor
):
11 _VALID_URL
= r
'https?://(?:www\.)?bigflix\.com/.+/(?P<id>[0-9]+)'
14 'url': 'http://www.bigflix.com/Tamil-movies/Drama-movies/Madarasapatinam/16070',
18 'title': 'Madarasapatinam',
19 'description': 'md5:9f0470b26a4ba8e824c823b5d95c2f6b',
20 'formats': 'mincount:2',
23 'skip_download': True,
27 'url': 'http://www.bigflix.com/Malayalam-movies/Drama-movies/Indian-Rupee/15967',
28 'only_matching': True,
31 def _real_extract(self
, url
):
32 video_id
= self
._match
_id
(url
)
34 webpage
= self
._download
_webpage
(url
, video_id
)
36 title
= self
._html
_search
_regex
(
37 r
'<div[^>]+class=["\']pagetitle
["\'][^>]*>(.+?)</div>',
40 def decode_url(quoted_b64_url):
41 return compat_b64decode(compat_urllib_parse_unquote(
42 quoted_b64_url)).decode('utf-8')
45 for height, encoded_url in re.findall(
46 r'ContentURL_(\d{3,4})[pP][^=]+=([^&]+)', webpage):
47 video_url = decode_url(encoded_url)
50 'format_id': '%sp' % height,
51 'height': int(height),
53 if video_url.startswith('rtmp'):
57 file_url = self._search_regex(
58 r'file=([^&]+)', webpage, 'video url', default=None)
60 video_url = decode_url(file_url)
61 if all(f['url'] != video_url for f in formats):
63 'url': decode_url(file_url),
66 description = self._html_search_meta('description', webpage)
71 'description': description,