3 from .common
import InfoExtractor
10 get_element_html_by_class
,
11 get_elements_by_class
,
16 from ..utils
.traversal
import find_element
, find_elements
, traverse_obj
19 class NubilesPornIE(InfoExtractor
):
20 _NETRC_MACHINE
= 'nubiles-porn'
22 https://members\.nubiles-porn\.com/video/watch/(?P<id>\d+)
23 (?:/(?P<display_id>[\w\-]+-s(?P<season>\d+)e(?P<episode>\d+)))?
27 'url': 'https://members.nubiles-porn.com/video/watch/165320/trying-to-focus-my-one-track-mind-s3e1',
28 'md5': 'fa7f09da8027c35e4bdf0f94f55eac82',
31 'title': 'Trying To Focus My One Track Mind - S3:E1',
33 'display_id': 'trying-to-focus-my-one-track-mind-s3e1',
34 'thumbnail': 'https://images.nubiles-porn.com/videos/trying_to_focus_my_one_track_mind/samples/cover1280.jpg',
35 'description': 'md5:81f3d4372e0e39bff5c801da277a5141',
36 'timestamp': 1676160000,
37 'upload_date': '20230212',
38 'channel': 'Younger Mommy',
40 'channel_url': 'https://members.nubiles-porn.com/video/website/64',
42 'average_rating': float,
44 'categories': ['Big Boobs', 'Big Naturals', 'Blowjob', 'Brunette', 'Cowgirl', 'Girl Orgasm', 'Girl-Boy',
45 'Glasses', 'Hardcore', 'Milf', 'Shaved Pussy', 'Tattoos', 'YoungerMommy.com'],
47 'cast': ['Kenzie Love'],
48 'availability': 'needs_auth',
49 'series': 'Younger Mommy',
53 'episode': 'Episode 1',
58 def _perform_login(self
, username
, password
):
59 login_webpage
= self
._download
_webpage
('https://nubiles-porn.com/login', video_id
=None)
60 inputs
= self
._hidden
_inputs
(login_webpage
)
61 inputs
.update({'username': username
, 'password': password
})
62 self
._request
_webpage
('https://nubiles-porn.com/authentication/login', None, data
=urlencode_postdata(inputs
))
64 def _real_extract(self
, url
):
65 url_match
= self
._match
_valid
_url
(url
)
66 video_id
= url_match
.group('id')
67 page
= self
._download
_webpage
(url
, video_id
)
69 media_entries
= self
._parse
_html
5_media
_entries
(
70 url
, get_element_by_class('watch-page-video-wrapper', page
), video_id
)[0]
72 channel_id
, channel_name
= self
._search
_regex
(
73 r
'/video/website/(?P<id>\d+).+>(?P<name>\w+).com', get_element_html_by_class('site-link', page
) or '',
74 'channel', fatal
=False, group
=('id', 'name')) or (None, None)
78 'title': self
._search
_regex
('<h2>([^<]+)</h2>', page
, 'title', fatal
=False),
79 'formats': media_entries
.get('formats'),
80 'display_id': url_match
.group('display_id'),
81 'thumbnail': media_entries
.get('thumbnail'),
82 'description': clean_html(get_element_html_by_class('content-pane-description', page
)),
83 'timestamp': unified_timestamp(get_element_by_class('date', page
)),
84 'channel': re
.sub(r
'([^A-Z]+)([A-Z]+)', r
'\1 \2', channel_name
) if channel_name
else None,
85 'channel_id': channel_id
,
86 'channel_url': format_field(channel_id
, None, 'https://members.nubiles-porn.com/video/website/%s'),
87 'like_count': int_or_none(get_element_by_id('likecount', page
)),
88 'average_rating': float_or_none(get_element_by_class('score', page
)),
90 'categories': traverse_obj(page
, ({find_element(cls
='categories')}, {find_elements(cls
='btn')}, ..., {clean_html}
)),
91 'tags': traverse_obj(page
, ({find_elements(cls
='tags')}, 1, {find_elements(cls
='btn')}, ..., {clean_html}
)),
92 'cast': get_elements_by_class('content-pane-performer', page
),
93 'availability': 'needs_auth',
94 'series': channel_name
,
95 'series_id': channel_id
,
96 'season_number': int_or_none(url_match
.group('season')),
97 'episode_number': int_or_none(url_match
.group('episode')),