[VXXX] Support "friend" site: bdsmx.tube

This commit is contained in:
tabjy 2022-10-02 05:26:06 -04:00
parent c0bda232e9
commit a59f77ebab
3 changed files with 47 additions and 9 deletions

View File

@ -0,0 +1,39 @@
from .vxxx import VXXXIE
class BdsmxTubeIE(VXXXIE):
_VALID_URL = r'https?://bdsmx\.tube/video/(?P<id>\d+)'
_TESTS = [{
'url': 'https://bdsmx.tube/video/127583/latex-puppy-leashed/',
'md5': '06b6000c19207cb068bc0009f243345d',
'info_dict': {
'id': '127583',
'ext': 'mp4',
'title': 'Latex Puppy Leashed',
'display_id': 'latex-puppy-leashed',
'thumbnail': 'https://tn.bdsmx-porn.com/contents/videos_screenshots/127000/127583/480x270/1.jpg',
'description': '',
'timestamp': 1651003323,
'upload_date': '20220426',
'duration': 68.0,
'categories': ['Asian', 'Brunette', 'Cosplay', 'Fetish',
'Fuck Machine', 'Gagging', 'Japanese',
'JAV Uncensored', 'Latex', 'Leather', 'POV']}
}]
def _download_info_object(self, video_id):
return self._download_json(
'https://bdsmx.tube/api/json/video/86400/0/{}/{}.json'.format(
int(video_id) // 1000 * 1000,
video_id,
), video_id, headers={'Referer': 'https://bdsmx.tube'})['video']
def _download_format_object(self, video_id):
return self._download_json(
'https://bdsmx.tube/api/videofile.php?video_id={}'.format(video_id),
video_id,
headers={'Referer': 'https://bdsmx.tube'}
)
def _get_video_host(self):
return 'bdsmx.tube'

View File

@ -106,6 +106,7 @@ from .bbc import (
BBCCoUkPlaylistIE,
BBCIE,
)
from .bdsmxtube import BdsmxTubeIE
from .beeg import BeegIE
from .behindkink import BehindKinkIE
from .bellmedia import BellMediaIE

View File

@ -23,10 +23,6 @@ class VXXXIE(InfoExtractor):
'timestamp': 1607167706,
'upload_date': '20201205',
'duration': 2373.0,
'view_count': 1071,
'like_count': 1,
'dislike_count': 0,
'average_rating': 5.0,
'categories': ['Anal', 'Asian', 'BDSM', 'Brunette', 'Toys',
'Fetish', 'HD', 'Interracial', 'MILF'],
}}]
@ -50,8 +46,8 @@ class VXXXIE(InfoExtractor):
def _decode_base164(self, e):
"""
Some non-standard encoding called "base164" in the JavaScript code. It
is similar to base 64 with some alphabets replaced:
Some non-standard encoding called "base164" in the JavaScript code. It's
similar to the regular base64 with a slightly different alphabet:
- "АВСЕМ" are Cyrillic letters instead of uppercase English letters
- "." is used instead of "+"; "," is used instead of "/"
- "~" is used for padding instead of "="
@ -91,9 +87,11 @@ class VXXXIE(InfoExtractor):
}
qualities = {
'_fhd.mp4': -1,
'_hd.mp4': -2,
'_sd.mp4': -3
'_fhd.mp4': -1, # 1080p
'_hd.mp4': -2, # 720p
'_hq.mp4': -2, # 720p
'_sd.mp4': -3, # 480p
'_lq.mp4': -3 # 480p
}
format_object = self._download_format_object(video_id)