3 from .common
import InfoExtractor
10 get_element_html_by_class
,
11 get_elements_by_class
,
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
),
74 'channel', fatal
=False, group
=('id', 'name')) or (None, None)
75 channel_name
= re
.sub(r
'([^A-Z]+)([A-Z]+)', r
'\1 \2', channel_name
)
79 'title': self
._search
_regex
('<h2>([^<]+)</h2>', page
, 'title', fatal
=False),
80 'formats': media_entries
.get('formats'),
81 'display_id': url_match
.group('display_id'),
82 'thumbnail': media_entries
.get('thumbnail'),
83 'description': clean_html(get_element_html_by_class('content-pane-description', page
)),
84 'timestamp': unified_timestamp(get_element_by_class('date', page
)),
85 'channel': channel_name
,
86 'channel_id': channel_id
,
87 'channel_url': format_field(channel_id
, None, 'https://members.nubiles-porn.com/video/website/%s'),
88 'like_count': int_or_none(get_element_by_id('likecount', page
)),
89 'average_rating': float_or_none(get_element_by_class('score', page
)),
91 'categories': try_call(lambda: list(map(clean_html
, get_elements_by_class('btn', get_element_by_class('categories', page
))))),
92 'tags': try_call(lambda: list(map(clean_html
, get_elements_by_class('btn', get_elements_by_class('tags', page
)[1])))),
93 'cast': get_elements_by_class('content-pane-performer', page
),
94 'availability': 'needs_auth',
95 'series': channel_name
,
96 'series_id': channel_id
,
97 'season_number': int_or_none(url_match
.group('season')),
98 'episode_number': int_or_none(url_match
.group('episode')),