4 from .common
import InfoExtractor
18 def decode_base64(text
):
19 return base64
.b64decode(text
.translate(text
.maketrans({
39 def get_formats(host
, video_file
):
41 'url': urljoin(f
'https://{host}', decode_base64(video
['video_url'])),
42 'format_id': try_call(lambda: variadic(video
['format'])[0].lstrip('_')),
44 } for index
, video
in enumerate(video_file
) if video
.get('video_url')]
47 class TxxxIE(InfoExtractor
):
55 'privatehomeclips.com',
56 'tubepornclassic.com',
67 _VALID_URL
= rf
'''(?x)
68 https?://(?:www\.)?(?P<host>{"|".join(map(re.escape, _DOMAINS))})/
69 (?:videos?[/-]|embed/)(?P<id>\d+)(?:/(?P<display_id>[^/?#]+))?
71 _EMBED_REGEX
= [rf
'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?(?:{"|".join(map(re.escape, _DOMAINS))})/embed/[^"\']*)\1']
73 'url': 'https://txxx.com/videos/16574965/digital-desire-malena-morgan/',
74 'md5': 'c54e4ace54320aaf8e2a72df87859391',
77 'display_id': 'digital-desire-malena-morgan',
79 'title': 'Digital Desire - Malena Morgan',
80 'uploader': 'Lois Argentum',
88 'url': 'https://txxx.tube/videos/16574965/digital-desire-malena-morgan/',
89 'md5': 'c54e4ace54320aaf8e2a72df87859391',
92 'display_id': 'digital-desire-malena-morgan',
94 'title': 'Digital Desire - Malena Morgan',
95 'uploader': 'Lois Argentum',
103 'url': 'https://vxxx.com/video-68925/',
104 'md5': '1fcff3748b0c5b41fe41d0afa22409e1',
107 'display_id': '68925',
109 'title': 'Malena Morgan',
110 'uploader': 'Huge Hughes',
114 'dislike_count': int,
118 'url': 'https://hclips.com/videos/6291073/malena-morgan-masturbates-her-sweet/',
119 'md5': 'a5dd4f83363972ee043313cff85e7e26',
122 'display_id': 'malena-morgan-masturbates-her-sweet',
124 'title': 'Malena Morgan masturbates her sweet',
125 'uploader': 'John Salt',
129 'dislike_count': int,
133 'url': 'https://hdzog.com/videos/67063/gorgeous-malena-morgan-will-seduce-you-at-the-first-glance/',
134 'md5': 'f8bdedafd45d1ec2875c43fe33a846d3',
137 'display_id': 'gorgeous-malena-morgan-will-seduce-you-at-the-first-glance',
139 'title': 'Gorgeous Malena Morgan will seduce you at the first glance',
140 'uploader': 'momlesson',
144 'dislike_count': int,
148 'url': 'https://hdzog.tube/videos/67063/gorgeous-malena-morgan-will-seduce-you-at-the-first-glance/',
149 'md5': 'f8bdedafd45d1ec2875c43fe33a846d3',
152 'display_id': 'gorgeous-malena-morgan-will-seduce-you-at-the-first-glance',
154 'title': 'Gorgeous Malena Morgan will seduce you at the first glance',
155 'uploader': 'momlesson',
159 'dislike_count': int,
163 'url': 'https://hotmovs.com/videos/8789287/unbelievable-malena-morgan-performing-in-incredible-masturantion/',
164 'md5': '71d32c51584876472db87e561171a386',
167 'display_id': 'unbelievable-malena-morgan-performing-in-incredible-masturantion',
169 'title': 'Unbelievable Malena Morgan performing in incredible masturantion',
170 'uploader': 'Davit Sanchez',
174 'dislike_count': int,
178 'url': 'https://hotmovs.tube/videos/8789287/unbelievable-malena-morgan-performing-in-incredible-masturantion/',
179 'md5': '71d32c51584876472db87e561171a386',
182 'display_id': 'unbelievable-malena-morgan-performing-in-incredible-masturantion',
184 'title': 'Unbelievable Malena Morgan performing in incredible masturantion',
185 'uploader': 'Davit Sanchez',
189 'dislike_count': int,
193 'url': 'https://inporn.com/video/517897/malena-morgan-solo/',
194 'md5': '344db467481edf78f193cdf5820a7cfb',
197 'display_id': 'malena-morgan-solo',
199 'title': 'Malena Morgan - Solo',
200 'uploader': 'Ashley Oxy',
204 'dislike_count': int,
208 'url': 'https://privatehomeclips.com/videos/3630599/malena-morgan-cam-show/',
209 'md5': 'ea657273e352493c5fb6357fbfa4f126',
212 'display_id': 'malena-morgan-cam-show',
214 'title': 'malena morgan cam show',
215 'uploader': 'Member9915',
219 'dislike_count': int,
223 'url': 'https://tubepornclassic.com/videos/1015455/mimi-rogers-full-body-massage-nude-compilation/',
224 'md5': '2e9a6cf610c9862e86e0ce24f08f4427',
227 'display_id': 'mimi-rogers-full-body-massage-nude-compilation',
229 'title': 'Mimi Rogers - Full Body Massage (Nude) compilation',
230 'uploader': '88bhuto',
234 'dislike_count': int,
238 'url': 'https://upornia.com/videos/1498858/twistys-malena-morgan-starring-at-dr-morgan-baller/',
239 'md5': '7ff7033340bc88a173198b7c22600e4f',
242 'display_id': 'twistys-malena-morgan-starring-at-dr-morgan-baller',
244 'title': 'Twistys - Malena Morgan starring at Dr. Morgan-Baller',
245 'uploader': 'mindgeek',
249 'dislike_count': int,
253 'url': 'https://upornia.tube/videos/1498858/twistys-malena-morgan-starring-at-dr-morgan-baller/',
254 'md5': '7ff7033340bc88a173198b7c22600e4f',
257 'display_id': 'twistys-malena-morgan-starring-at-dr-morgan-baller',
259 'title': 'Twistys - Malena Morgan starring at Dr. Morgan-Baller',
260 'uploader': 'mindgeek',
264 'dislike_count': int,
268 'url': 'https://vjav.com/videos/11761/yui-hatano-in-if-yui-was-my-girlfriend2/',
269 'md5': '6de5bc1f13bdfc3491a77f23edb1676f',
272 'display_id': 'yui-hatano-in-if-yui-was-my-girlfriend2',
274 'title': 'Yui Hatano in If Yui Was My Girlfriend',
275 'uploader': 'Matheus69',
279 'dislike_count': int,
283 'url': 'https://vjav.tube/videos/11761/yui-hatano-in-if-yui-was-my-girlfriend2/',
284 'md5': '6de5bc1f13bdfc3491a77f23edb1676f',
287 'display_id': 'yui-hatano-in-if-yui-was-my-girlfriend2',
289 'title': 'Yui Hatano in If Yui Was My Girlfriend',
290 'uploader': 'Matheus69',
294 'dislike_count': int,
298 'url': 'https://voyeurhit.com/videos/332875/charlotte-stokely-elle-alexandra-malena-morgan-lingerie/',
299 'md5': '12b4666e9c3e60dafe9182e5d12aae33',
302 'display_id': 'charlotte-stokely-elle-alexandra-malena-morgan-lingerie',
304 'title': 'Charlotte Stokely, Elle Alexandra, Malena Morgan-Lingerie',
305 'uploader': 'Kyle Roberts',
309 'dislike_count': int,
313 'url': 'https://voyeurhit.tube/videos/332875/charlotte-stokely-elle-alexandra-malena-morgan-lingerie/',
314 'md5': '12b4666e9c3e60dafe9182e5d12aae33',
317 'display_id': 'charlotte-stokely-elle-alexandra-malena-morgan-lingerie',
319 'title': 'Charlotte Stokely, Elle Alexandra, Malena Morgan-Lingerie',
320 'uploader': 'Kyle Roberts',
324 'dislike_count': int,
329 'url': 'https://pornzog.com/video/9125519/michelle-malone-dreamgirls-wild-wet-3/',
332 'display_id': '5119660',
334 'title': 'Michelle Malone - Dreamgirls - Wild Wet 3',
335 'uploader': 'FallenAngel12',
339 'dislike_count': int,
344 def _call_api(self
, url
, video_id
, fatal
=False, **kwargs
):
345 content
= self
._download
_json
(url
, video_id
, fatal
=fatal
, **kwargs
)
346 if traverse_obj(content
, 'error'):
347 raise self
._error
_or
_warning
(ExtractorError(
348 f
'Txxx said: {content["error"]}', expected
=True), fatal
=fatal
)
351 def _real_extract(self
, url
):
352 video_id
, host
, display_id
= self
._match
_valid
_url
(url
).group('id', 'host', 'display_id')
353 headers
= {'Referer': url, 'X-Requested-With': 'XMLHttpRequest'}
355 video_file
= self
._call
_api
(
356 f
'https://{host}/api/videofile.php?video_id={video_id}&lifetime=8640000',
357 video_id
, fatal
=True, note
='Downloading video file info', headers
=headers
)
359 slug
= f
'{int(1E6 * (int(video_id) // 1E6))}/{1000 * (int(video_id) // 1000)}'
360 video_info
= self
._call
_api
(
361 f
'https://{host}/api/json/video/86400/{slug}/{video_id}.json',
362 video_id
, note
='Downloading video info', headers
=headers
)
366 'display_id': display_id
,
367 'title': traverse_obj(video_info
, ('video', 'title')),
368 'uploader': traverse_obj(video_info
, ('video', 'user', 'username')),
369 'duration': parse_duration(traverse_obj(video_info
, ('video', 'duration'))),
370 'view_count': int_or_none(traverse_obj(video_info
, ('video', 'statistics', 'viewed'))),
371 'like_count': int_or_none(traverse_obj(video_info
, ('video', 'statistics', 'likes'))),
372 'dislike_count': int_or_none(traverse_obj(video_info
, ('video', 'statistics', 'dislikes'))),
374 'formats': get_formats(host
, video_file
),
378 class PornTopIE(InfoExtractor
):
379 _VALID_URL
= r
'https?://(?P<host>(?:www\.)?porntop\.com)/video/(?P<id>\d+)(?:/(?P<display_id>[^/?]+))?'
381 'url': 'https://porntop.com/video/101569/triple-threat-with-lia-lor-malena-morgan-and-dani-daniels/',
382 'md5': '612ba7b3cb99455b382972948e200b08',
385 'display_id': 'triple-threat-with-lia-lor-malena-morgan-and-dani-daniels',
387 'title': 'Triple Threat With Lia Lor, Malena Morgan And Dani Daniels',
388 'description': 'md5:285357d9d3a00ce5acb29f39f826dbf6',
389 'uploader': 'PatrickBush',
393 'dislike_count': int,
395 'timestamp': 1609455029,
396 'upload_date': '20201231',
397 'thumbnail': 'https://tn.porntop.com/media/tn/sources/101569_1.jpg',
401 def _real_extract(self
, url
):
402 video_id
, host
, display_id
= self
._match
_valid
_url
(url
).group('id', 'host', 'display_id')
403 webpage
= self
._download
_webpage
(url
, video_id
)
405 json_ld
= self
._json
_ld
(self
._search
_json
(
406 r
'\bschemaJson\s*=', webpage
, 'JSON-LD', video_id
, transform_source
=js_to_json
,
407 contains_pattern
='{[^<]+?VideoObject[^<]+};'), video_id
, fatal
=True)
409 video_file
= self
._parse
_json
(decode_base64(self
._search
_regex
(
410 r
"window\.initPlayer\(.*}}},\s*'(?P<json_b64c>[^']+)'",
411 webpage
, 'json_urls', group
='json_b64c')), video_id
)
415 'display_id': display_id
,
417 'formats': get_formats(host
, video_file
),