]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/watchindianporn.py
3 from .common
import InfoExtractor
4 from ..utils
import parse_duration
7 class WatchIndianPornIE(InfoExtractor
):
8 IE_DESC
= 'Watch Indian Porn'
9 _VALID_URL
= r
'https?://(?:www\.)?watchindianporn\.net/(?:[^/]+/)*video/(?P<display_id>[^/]+)-(?P<id>[a-zA-Z0-9]+)\.html'
11 'url': 'http://www.watchindianporn.net/video/hot-milf-from-kerala-shows-off-her-gorgeous-large-breasts-on-camera-RZa2avywNPa.html',
12 'md5': '249589a164dde236ec65832bfce17440',
15 'display_id': 'hot-milf-from-kerala-shows-off-her-gorgeous-large-breasts-on-camera',
17 'title': 'Hot milf from kerala shows off her gorgeous large breasts on camera',
18 'thumbnail': r
're:^https?://.*\.jpg$',
26 def _real_extract(self
, url
):
27 mobj
= self
._match
_valid
_url
(url
)
28 video_id
= mobj
.group('id')
29 display_id
= mobj
.group('display_id')
31 webpage
= self
._download
_webpage
(url
, display_id
)
33 info_dict
= self
._parse
_html
5_media
_entries
(url
, webpage
, video_id
)[0]
35 title
= self
._html
_search
_regex
((
36 r
'<title>(.+?)\s*-\s*Indian\s+Porn</title>',
40 duration
= parse_duration(self
._search
_regex
(
41 r
'Time:\s*<strong>\s*(.+?)\s*</strong>',
42 webpage
, 'duration', fatal
=False))
44 view_count
= int(self
._search
_regex
(
45 r
'(?s)Time:\s*<strong>.*?</strong>.*?<strong>\s*(\d+)\s*</strong>',
46 webpage
, 'view count', fatal
=False))
48 categories
= re
.findall(
49 r
'<a[^>]+class=[\'"]categories[\'"][^
>]*>\s
*([^
<]+)\s
*</a
>',
54 'display_id
': display_id,
60 'view_count
': view_count,
61 'categories
': categories,