- webpage = self._download_webpage(url, video_id, "get HTML content")
- title = re.search(
- r'<div id="viewvideo-title">(.+?)</div>',
- webpage,
- re.DOTALL)
- assert title
- title = title.group(1).replace('\n', '')
-
- # get real url
- n1 = re.search(r'so.addVariable\(\'file\',\'(\d+)\'', webpage)
- n2 = re.search(r'so.addVariable\(\'seccode\',\'(.+?)\'', webpage)
- n3 = re.search(r'so.addVariable\(\'max_vid\',\'(\d+)\'', webpage)
- if not (n1 and n2 and n3):
- raise ExtractorError("You are Blocked by Server.")
-
- url_params = compat_urllib_parse.urlencode({
- 'VID': n1.group(1),
- 'mp4': '1',
- 'seccode': n2.group(1),
- 'max_vid': n3.group(1),
- })
- t_url = 'http://91porn.com/getfile.php?' + url_params
- info_cn = self._download_webpage(t_url, video_id, "get real video_url")
- video_url = re.search(r'file=(http.+?)&', info_cn).group(1)