2016-04-29 11:59:23 +02:00
|
|
|
import re
|
|
|
|
|
|
|
|
from .common import InfoExtractor
|
2017-06-19 23:30:45 +02:00
|
|
|
from ..utils import parse_duration
|
2016-04-29 11:59:23 +02:00
|
|
|
|
|
|
|
|
2016-04-29 12:17:08 +02:00
|
|
|
class WatchIndianPornIE(InfoExtractor):
|
|
|
|
IE_DESC = 'Watch Indian Porn'
|
|
|
|
_VALID_URL = r'https?://(?:www\.)?watchindianporn\.net/(?:[^/]+/)*video/(?P<display_id>[^/]+)-(?P<id>[a-zA-Z0-9]+)\.html'
|
|
|
|
_TEST = {
|
|
|
|
'url': 'http://www.watchindianporn.net/video/hot-milf-from-kerala-shows-off-her-gorgeous-large-breasts-on-camera-RZa2avywNPa.html',
|
|
|
|
'md5': '249589a164dde236ec65832bfce17440',
|
2016-04-29 11:59:23 +02:00
|
|
|
'info_dict': {
|
2016-04-29 12:17:08 +02:00
|
|
|
'id': 'RZa2avywNPa',
|
|
|
|
'display_id': 'hot-milf-from-kerala-shows-off-her-gorgeous-large-breasts-on-camera',
|
2016-04-29 11:59:23 +02:00
|
|
|
'ext': 'mp4',
|
2016-04-29 12:17:08 +02:00
|
|
|
'title': 'Hot milf from kerala shows off her gorgeous large breasts on camera',
|
2017-01-02 13:08:07 +01:00
|
|
|
'thumbnail': r're:^https?://.*\.jpg$',
|
2016-04-29 12:17:08 +02:00
|
|
|
'duration': 226,
|
2016-04-29 11:59:23 +02:00
|
|
|
'view_count': int,
|
|
|
|
'categories': list,
|
|
|
|
'age_limit': 18,
|
|
|
|
}
|
2016-04-29 12:17:08 +02:00
|
|
|
}
|
2016-04-29 11:59:23 +02:00
|
|
|
|
|
|
|
def _real_extract(self, url):
|
2021-08-19 03:41:24 +02:00
|
|
|
mobj = self._match_valid_url(url)
|
2016-04-29 11:59:23 +02:00
|
|
|
video_id = mobj.group('id')
|
|
|
|
display_id = mobj.group('display_id')
|
|
|
|
|
|
|
|
webpage = self._download_webpage(url, display_id)
|
|
|
|
|
2017-06-19 23:30:45 +02:00
|
|
|
info_dict = self._parse_html5_media_entries(url, webpage, video_id)[0]
|
2016-04-29 11:59:23 +02:00
|
|
|
|
2017-06-19 23:30:45 +02:00
|
|
|
title = self._html_search_regex((
|
|
|
|
r'<title>(.+?)\s*-\s*Indian\s+Porn</title>',
|
|
|
|
r'<h4>(.+?)</h4>'
|
|
|
|
), webpage, 'title')
|
2016-04-29 11:59:23 +02:00
|
|
|
|
|
|
|
duration = parse_duration(self._search_regex(
|
2017-06-19 23:30:45 +02:00
|
|
|
r'Time:\s*<strong>\s*(.+?)\s*</strong>',
|
2016-04-29 11:59:23 +02:00
|
|
|
webpage, 'duration', fatal=False))
|
|
|
|
|
2017-06-19 23:30:45 +02:00
|
|
|
view_count = int(self._search_regex(
|
|
|
|
r'(?s)Time:\s*<strong>.*?</strong>.*?<strong>\s*(\d+)\s*</strong>',
|
2016-04-29 11:59:23 +02:00
|
|
|
webpage, 'view count', fatal=False))
|
|
|
|
|
|
|
|
categories = re.findall(
|
2017-06-19 23:30:45 +02:00
|
|
|
r'<a[^>]+class=[\'"]categories[\'"][^>]*>\s*([^<]+)\s*</a>',
|
2016-04-29 11:59:23 +02:00
|
|
|
webpage)
|
|
|
|
|
2017-06-19 23:30:45 +02:00
|
|
|
info_dict.update({
|
2016-04-29 11:59:23 +02:00
|
|
|
'id': video_id,
|
|
|
|
'display_id': display_id,
|
2016-04-29 12:17:08 +02:00
|
|
|
'http_headers': {
|
|
|
|
'Referer': url,
|
|
|
|
},
|
2016-04-29 11:59:23 +02:00
|
|
|
'title': title,
|
|
|
|
'duration': duration,
|
|
|
|
'view_count': view_count,
|
|
|
|
'categories': categories,
|
|
|
|
'age_limit': 18,
|
2017-06-19 23:30:45 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
return info_dict
|