mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-05-30 01:22:40 +09:00
Compare commits
17 Commits
012b58d63e
...
8b6a07cae9
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8b6a07cae9 | ||
![]() |
3eb8d22ddb | ||
![]() |
4e714f9df1 | ||
![]() |
c1ea7f5a24 | ||
![]() |
76738e4832 | ||
![]() |
191d1d0a85 | ||
![]() |
9d2b2f9b1e | ||
![]() |
8414d8d8f5 | ||
![]() |
1e522505be | ||
![]() |
9c5c778792 | ||
![]() |
f2398c0070 | ||
![]() |
a6a1c149d6 | ||
![]() |
aaafaa2cb8 | ||
![]() |
ba4c5b3a2e | ||
![]() |
a59f77ebab | ||
![]() |
c0bda232e9 | ||
![]() |
6b7441ed64 |
@ -32,7 +32,7 @@ class BokeCCBaseIE(InfoExtractor):
|
|||||||
|
|
||||||
|
|
||||||
class BokeCCIE(BokeCCBaseIE):
|
class BokeCCIE(BokeCCBaseIE):
|
||||||
_IE_DESC = 'CC视频'
|
IE_DESC = 'CC视频'
|
||||||
_VALID_URL = r'https?://union\.bokecc\.com/playvideo\.bo\?(?P<query>.*)'
|
_VALID_URL = r'https?://union\.bokecc\.com/playvideo\.bo\?(?P<query>.*)'
|
||||||
|
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
|
@ -9,7 +9,7 @@ from ..utils import (
|
|||||||
|
|
||||||
|
|
||||||
class CloudyIE(InfoExtractor):
|
class CloudyIE(InfoExtractor):
|
||||||
_IE_DESC = 'cloudy.ec'
|
IE_DESC = 'cloudy.ec'
|
||||||
_VALID_URL = r'https?://(?:www\.)?cloudy\.ec/(?:v/|embed\.php\?.*?\bid=)(?P<id>[A-Za-z0-9]+)'
|
_VALID_URL = r'https?://(?:www\.)?cloudy\.ec/(?:v/|embed\.php\?.*?\bid=)(?P<id>[A-Za-z0-9]+)'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.cloudy.ec/v/af511e2527aac',
|
'url': 'https://www.cloudy.ec/v/af511e2527aac',
|
||||||
|
@ -422,6 +422,8 @@ class InfoExtractor(object):
|
|||||||
_GEO_COUNTRIES = None
|
_GEO_COUNTRIES = None
|
||||||
_GEO_IP_BLOCKS = None
|
_GEO_IP_BLOCKS = None
|
||||||
_WORKING = True
|
_WORKING = True
|
||||||
|
# supply this in public subclasses: used in supported sites list, etc
|
||||||
|
# IE_DESC = 'short description of IE'
|
||||||
|
|
||||||
def __init__(self, downloader=None):
|
def __init__(self, downloader=None):
|
||||||
"""Constructor. Receives an optional downloader."""
|
"""Constructor. Receives an optional downloader."""
|
||||||
|
@ -1549,6 +1549,11 @@ from .vvvvid import (
|
|||||||
VVVVIDIE,
|
VVVVIDIE,
|
||||||
VVVVIDShowIE,
|
VVVVIDShowIE,
|
||||||
)
|
)
|
||||||
|
from .vxxx import (
|
||||||
|
InPornIE,
|
||||||
|
MrGayIE,
|
||||||
|
VXXXIE,
|
||||||
|
)
|
||||||
from .vyborymos import VyboryMosIE
|
from .vyborymos import VyboryMosIE
|
||||||
from .vzaar import VzaarIE
|
from .vzaar import VzaarIE
|
||||||
from .wakanim import WakanimIE
|
from .wakanim import WakanimIE
|
||||||
|
@ -35,15 +35,6 @@ from ..utils import (
|
|||||||
|
|
||||||
class ITVBaseIE(InfoExtractor):
|
class ITVBaseIE(InfoExtractor):
|
||||||
|
|
||||||
def _search_nextjs_data(self, webpage, video_id, **kw):
|
|
||||||
transform_source = kw.pop('transform_source', None)
|
|
||||||
fatal = kw.pop('fatal', True)
|
|
||||||
return self._parse_json(
|
|
||||||
self._search_regex(
|
|
||||||
r'''<script\b[^>]+\bid=('|")__NEXT_DATA__\1[^>]*>(?P<js>[^<]+)</script>''',
|
|
||||||
webpage, 'next.js data', group='js', fatal=fatal, **kw),
|
|
||||||
video_id, transform_source=transform_source, fatal=fatal)
|
|
||||||
|
|
||||||
def __handle_request_webpage_error(self, err, video_id=None, errnote=None, fatal=True):
|
def __handle_request_webpage_error(self, err, video_id=None, errnote=None, fatal=True):
|
||||||
if errnote is False:
|
if errnote is False:
|
||||||
return False
|
return False
|
||||||
@ -109,7 +100,9 @@ class ITVBaseIE(InfoExtractor):
|
|||||||
|
|
||||||
class ITVIE(ITVBaseIE):
|
class ITVIE(ITVBaseIE):
|
||||||
_VALID_URL = r'https?://(?:www\.)?itv\.com/(?:(?P<w>watch)|hub)/[^/]+/(?(w)[\w-]+/)(?P<id>\w+)'
|
_VALID_URL = r'https?://(?:www\.)?itv\.com/(?:(?P<w>watch)|hub)/[^/]+/(?(w)[\w-]+/)(?P<id>\w+)'
|
||||||
_IE_DESC = 'ITVX'
|
IE_DESC = 'ITVX'
|
||||||
|
_WORKING = False
|
||||||
|
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'note': 'Hub URLs redirect to ITVX',
|
'note': 'Hub URLs redirect to ITVX',
|
||||||
'url': 'https://www.itv.com/hub/liar/2a4547a0012',
|
'url': 'https://www.itv.com/hub/liar/2a4547a0012',
|
||||||
@ -270,7 +263,7 @@ class ITVIE(ITVBaseIE):
|
|||||||
'ext': determine_ext(href, 'vtt'),
|
'ext': determine_ext(href, 'vtt'),
|
||||||
})
|
})
|
||||||
|
|
||||||
next_data = self._search_nextjs_data(webpage, video_id, fatal=False, default='{}')
|
next_data = self._search_nextjs_data(webpage, video_id, fatal=False, default={})
|
||||||
video_data.update(traverse_obj(next_data, ('props', 'pageProps', ('title', 'episode')), expected_type=dict)[0] or {})
|
video_data.update(traverse_obj(next_data, ('props', 'pageProps', ('title', 'episode')), expected_type=dict)[0] or {})
|
||||||
title = traverse_obj(video_data, 'headerTitle', 'episodeTitle')
|
title = traverse_obj(video_data, 'headerTitle', 'episodeTitle')
|
||||||
info = self._og_extract(webpage, require_title=not title)
|
info = self._og_extract(webpage, require_title=not title)
|
||||||
@ -323,7 +316,7 @@ class ITVIE(ITVBaseIE):
|
|||||||
|
|
||||||
class ITVBTCCIE(ITVBaseIE):
|
class ITVBTCCIE(ITVBaseIE):
|
||||||
_VALID_URL = r'https?://(?:www\.)?itv\.com/(?!(?:watch|hub)/)(?:[^/]+/)+(?P<id>[^/?#&]+)'
|
_VALID_URL = r'https?://(?:www\.)?itv\.com/(?!(?:watch|hub)/)(?:[^/]+/)+(?P<id>[^/?#&]+)'
|
||||||
_IE_DESC = 'ITV articles: News, British Touring Car Championship'
|
IE_DESC = 'ITV articles: News, British Touring Car Championship'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'note': 'British Touring Car Championship',
|
'note': 'British Touring Car Championship',
|
||||||
'url': 'https://www.itv.com/btcc/articles/btcc-2018-all-the-action-from-brands-hatch',
|
'url': 'https://www.itv.com/btcc/articles/btcc-2018-all-the-action-from-brands-hatch',
|
||||||
|
@ -47,7 +47,7 @@ class SenateISVPIE(InfoExtractor):
|
|||||||
['vetaff', '76462', 'http://vetaff-f.akamaihd.net'],
|
['vetaff', '76462', 'http://vetaff-f.akamaihd.net'],
|
||||||
['arch', '', 'http://ussenate-f.akamaihd.net/']
|
['arch', '', 'http://ussenate-f.akamaihd.net/']
|
||||||
]
|
]
|
||||||
_IE_NAME = 'senate.gov'
|
IE_NAME = 'senate.gov'
|
||||||
_VALID_URL = r'https?://(?:www\.)?senate\.gov/isvp/?\?(?P<qs>.+)'
|
_VALID_URL = r'https?://(?:www\.)?senate\.gov/isvp/?\?(?P<qs>.+)'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://www.senate.gov/isvp/?comm=judiciary&type=live&stt=&filename=judiciary031715&auto_play=false&wmode=transparent&poster=http%3A%2F%2Fwww.judiciary.senate.gov%2Fthemes%2Fjudiciary%2Fimages%2Fvideo-poster-flash-fit.png',
|
'url': 'http://www.senate.gov/isvp/?comm=judiciary&type=live&stt=&filename=judiciary031715&auto_play=false&wmode=transparent&poster=http%3A%2F%2Fwww.judiciary.senate.gov%2Fthemes%2Fjudiciary%2Fimages%2Fvideo-poster-flash-fit.png',
|
||||||
|
240
youtube_dl/extractor/vxxx.py
Normal file
240
youtube_dl/extractor/vxxx.py
Normal file
@ -0,0 +1,240 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import base64
|
||||||
|
|
||||||
|
from .common import InfoExtractor
|
||||||
|
from ..utils import (
|
||||||
|
float_or_none,
|
||||||
|
int_or_none,
|
||||||
|
parse_duration,
|
||||||
|
strip_or_none,
|
||||||
|
unified_timestamp,
|
||||||
|
url_or_none,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class VXXXIE(InfoExtractor):
|
||||||
|
_VALID_URL = r'https?://vxxx\.com/video-(?P<id>\d+)'
|
||||||
|
_TESTS = [{
|
||||||
|
'url': 'https://vxxx.com/video-80747/',
|
||||||
|
'md5': '2f4bfd829b682ff9e3da1bda71b81b81',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '80747',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Monica Aka Selina',
|
||||||
|
'display_id': 'monica-aka-selina',
|
||||||
|
'thumbnail': 'https://tn.vxxx.com/contents/videos_screenshots/80000/80747/420x236/1.jpg',
|
||||||
|
'description': None,
|
||||||
|
'timestamp': 1607167706,
|
||||||
|
'upload_date': '20201205',
|
||||||
|
'duration': 2373.0,
|
||||||
|
'categories': ['Anal', 'Asian', 'BDSM', 'Brunette', 'Toys',
|
||||||
|
'Fetish', 'HD', 'Interracial', 'MILF'],
|
||||||
|
'age_limit': 18,
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
|
||||||
|
_BASE_URL = 'https://vxxx.com'
|
||||||
|
_INFO_OBJECT_URL_TMPL = '{0}/api/json/video/86400/0/{1}/{2}.json'
|
||||||
|
_FORMAT_OBJECT_URL_TMPL = '{0}/api/videofile.php?video_id={1}'
|
||||||
|
|
||||||
|
def _download_info_object(self, video_id):
|
||||||
|
return self._download_json(
|
||||||
|
self._INFO_OBJECT_URL_TMPL.format(
|
||||||
|
self._BASE_URL,
|
||||||
|
int(video_id) // 1000 * 1000,
|
||||||
|
video_id,
|
||||||
|
), video_id, headers={'Referer': self._BASE_URL})['video']
|
||||||
|
|
||||||
|
def _download_format_object(self, video_id):
|
||||||
|
return self._download_json(
|
||||||
|
self._FORMAT_OBJECT_URL_TMPL.format(self._BASE_URL, video_id),
|
||||||
|
video_id,
|
||||||
|
headers={'Referer': self._BASE_URL}
|
||||||
|
)
|
||||||
|
|
||||||
|
def _decode_base164(self, e):
|
||||||
|
"""
|
||||||
|
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 Latin letters
|
||||||
|
- "." is used instead of "+"; "," is used instead of "/"
|
||||||
|
- "~" is used for padding instead of "="
|
||||||
|
"""
|
||||||
|
|
||||||
|
# using the kwarg to memoise the result
|
||||||
|
def get_trans_tbl(from_, to, tbl={}):
|
||||||
|
k = (from_, to)
|
||||||
|
if not tbl.get(k):
|
||||||
|
tbl[k] = str.maketrans(from_, to)
|
||||||
|
return tbl[k]
|
||||||
|
|
||||||
|
trans_tbl = get_trans_tbl(
|
||||||
|
'\u0410\u0412\u0421\u0415\u041c.,~',
|
||||||
|
'ABCEM+/=')
|
||||||
|
return base64.b64decode(e.translate(trans_tbl)).decode()
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
|
info_object = self._download_info_object(video_id)
|
||||||
|
|
||||||
|
title = info_object['title']
|
||||||
|
stats = info_object.get('statistics') or {}
|
||||||
|
info = {
|
||||||
|
'id': video_id,
|
||||||
|
'title': title,
|
||||||
|
'display_id': info_object.get('dir'),
|
||||||
|
'thumbnail': url_or_none(info_object.get('thumb')),
|
||||||
|
'description': strip_or_none(info_object.get('description')) or None,
|
||||||
|
'timestamp': unified_timestamp(info_object.get('post_date')),
|
||||||
|
'duration': parse_duration(info_object.get('duration')),
|
||||||
|
'view_count': int_or_none(stats.get('viewed')),
|
||||||
|
'like_count': int_or_none(stats.get('likes')),
|
||||||
|
'dislike_count': int_or_none(stats.get('dislikes')),
|
||||||
|
'average_rating': float_or_none(stats.get('rating')),
|
||||||
|
'categories': [category['title'] for category in (info_object.get('categories') or {}).values()
|
||||||
|
if category.get('title')],
|
||||||
|
'age_limit': 18,
|
||||||
|
}
|
||||||
|
|
||||||
|
format_object = self._download_format_object(video_id)
|
||||||
|
m3u8_formats = self._extract_m3u8_formats(
|
||||||
|
'{0}/{1}&f=video.m3u8'.format(
|
||||||
|
self._BASE_URL,
|
||||||
|
self._decode_base164(format_object[0]['video_url'])
|
||||||
|
),
|
||||||
|
video_id, 'mp4')
|
||||||
|
self._sort_formats(m3u8_formats)
|
||||||
|
info['formats'] = m3u8_formats
|
||||||
|
|
||||||
|
return info
|
||||||
|
|
||||||
|
|
||||||
|
class InPornIE(VXXXIE):
|
||||||
|
_VALID_URL = r'https?://(?:www\.)?inporn\.com/video/(?P<id>\d+)'
|
||||||
|
_TESTS = [{
|
||||||
|
'url': 'https://inporn.com/video/533613/2k-t-2nd-season-parm-151/',
|
||||||
|
'md5': 'c358d1da6b451ebe7cfb00dd89741607',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '533613',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': '2k 美月まい - ガーリー系アパレルモt゙ルの挑発パンチラ 2nd Season [parm-151]',
|
||||||
|
'display_id': '2k-t-2nd-season-parm-151',
|
||||||
|
'thumbnail': 'https://tn.inporn.com/media/tn/533613_1.jpg',
|
||||||
|
'description': None,
|
||||||
|
'timestamp': 1664571262,
|
||||||
|
'upload_date': '20220930',
|
||||||
|
'duration': 480.0,
|
||||||
|
'categories': ['Asian', 'Brunette', 'Casting', 'HD', 'Japanese',
|
||||||
|
'JAV Uncensored'],
|
||||||
|
'age_limit': 18,
|
||||||
|
},
|
||||||
|
}]
|
||||||
|
|
||||||
|
_BASE_URL = 'https://inporn.com'
|
||||||
|
|
||||||
|
|
||||||
|
class MrGayIE(VXXXIE):
|
||||||
|
_VALID_URL = r'https?://mrgay\.com/video/(?P<id>\d+)'
|
||||||
|
_TESTS = [{
|
||||||
|
'url': 'https://mrgay.com/video/10169199/jpn-crossdresser-6/',
|
||||||
|
'md5': 'b5780a9437c205b4bc87eb939b23e8ef',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '10169199',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Jpn Crossdresser 6',
|
||||||
|
'display_id': 'jpn-crossdresser-6',
|
||||||
|
'thumbnail': 'https://tn.mrgay.com/media/tn/10169199_1.jpg',
|
||||||
|
'description': None,
|
||||||
|
'timestamp': 1651066888,
|
||||||
|
'upload_date': '20220427',
|
||||||
|
'duration': 834.0,
|
||||||
|
'categories': ['Amateur', 'Asian', 'Brunette', 'Crossdressing',
|
||||||
|
'Japanese', 'Webcam'],
|
||||||
|
'age_limit': 18,
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
|
||||||
|
_BASE_URL = 'https://mrgay.com'
|
||||||
|
|
||||||
|
|
||||||
|
# The following three extractors are for "friend" sites whose videos could be
|
||||||
|
# extracted in the same way, but unsupported by youtube-dl due to missing proper
|
||||||
|
# DMCA notices. Consider re-enable them if their DMCA pages become available.
|
||||||
|
class BdsmxTubeIE(VXXXIE):
|
||||||
|
_VALID_URL = r'https?://bdsmx\.tube/video/(?P<id>\d+)'
|
||||||
|
_TESTS = [{
|
||||||
|
'url': 'https://bdsmx.tube/video/127583/latex-puppy-leashed/',
|
||||||
|
'md5': '79751d4ed75668afe07a660c4bcb2f1b',
|
||||||
|
'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': None,
|
||||||
|
'timestamp': 1651003323,
|
||||||
|
'upload_date': '20220426',
|
||||||
|
'duration': 68.0,
|
||||||
|
'categories': ['Asian', 'Brunette', 'Cosplay', 'Fetish',
|
||||||
|
'Fuck Machine', 'Gagging', 'Japanese',
|
||||||
|
'JAV Uncensored', 'Latex', 'Leather', 'POV'],
|
||||||
|
'age_limit': 18,
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
_WORKING = False
|
||||||
|
|
||||||
|
_BASE_URL = 'https://bdsmx.tube'
|
||||||
|
|
||||||
|
|
||||||
|
class BlackPornTubeIE(VXXXIE):
|
||||||
|
_VALID_URL = r'https?://blackporn\.tube/video/(?P<id>\d+)'
|
||||||
|
_TESTS = [{
|
||||||
|
'url': 'https://blackporn.tube/video/10043813/young-ebony-babe-gets-super-wet/',
|
||||||
|
'md5': '4a4c126970f2f1453b8b2050947fc870',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '10043813',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Young Ebony Babe Gets Super Wet',
|
||||||
|
'display_id': 'young-ebony-babe-gets-super-wet',
|
||||||
|
'thumbnail': 'https://tn.blackporn.tube/contents/videos_screenshots/10043000/10043813/480x270/1.jpg',
|
||||||
|
'description': None,
|
||||||
|
'timestamp': 1654806141,
|
||||||
|
'upload_date': '20220609',
|
||||||
|
'duration': 193.0,
|
||||||
|
'categories': ['BDSM', 'Bondage', 'Celebrity', 'Ebony', 'Fetish',
|
||||||
|
'Shibari Bondage', 'Solo Female',
|
||||||
|
'Tattoo'],
|
||||||
|
'age_limit': 18,
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
_WORKING = False
|
||||||
|
|
||||||
|
_BASE_URL = 'https://blackporn.tube'
|
||||||
|
|
||||||
|
|
||||||
|
class XMilfIE(VXXXIE):
|
||||||
|
_VALID_URL = r'https?://xmilf\.com/video/(?P<id>\d+)'
|
||||||
|
_TESTS = [{
|
||||||
|
'url': 'https://xmilf.com/video/143777/big-boob-brunette-masturbates3/',
|
||||||
|
'md5': 'a196fe8daebe194a758754c81e9232ad',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '143777',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Big Boob Brunette Masturbates',
|
||||||
|
'display_id': 'big-boob-brunette-masturbates3',
|
||||||
|
'thumbnail': 'https://tn.xmilf.com/contents/videos_screenshots/143000/143777/480x270/1.jpg',
|
||||||
|
'description': None,
|
||||||
|
'timestamp': 1662465481,
|
||||||
|
'upload_date': '20220906',
|
||||||
|
'duration': 480.0,
|
||||||
|
'categories': ['Amateur', 'Big Tits', 'Brunette', 'Fetish', 'HD',
|
||||||
|
'Lingerie', 'MILF', 'Webcam'],
|
||||||
|
'age_limit': 18,
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
_WORKING = False
|
||||||
|
|
||||||
|
_BASE_URL = 'https://xmilf.com'
|
@ -686,6 +686,8 @@ class JSInterpreter(object):
|
|||||||
raise self.Exception('Cannot get index {idx!r:.100}'.format(**locals()), expr=repr(obj), cause=e)
|
raise self.Exception('Cannot get index {idx!r:.100}'.format(**locals()), expr=repr(obj), cause=e)
|
||||||
|
|
||||||
def _dump(self, obj, namespace):
|
def _dump(self, obj, namespace):
|
||||||
|
if obj is JS_Undefined:
|
||||||
|
return 'undefined'
|
||||||
try:
|
try:
|
||||||
return json.dumps(obj)
|
return json.dumps(obj)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user