mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 16:06:49 +00:00
[SpankBang] Back-port changes to SpankBangIE from yt-dlp
* improve title extraction * add uploader_id * update test * but don't check file md5
This commit is contained in:
parent
04fd3289d3
commit
30a954bad9
@ -26,19 +26,24 @@ class SpankBangIE(InfoExtractor):
|
|||||||
)
|
)
|
||||||
'''
|
'''
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://spankbang.com/3vvn/video/fantasy+solo',
|
'url': 'https://spankbang.com/56b3d/video/the+slut+maker+hmv',
|
||||||
'md5': '1cc433e1d6aa14bc376535b8679302f7',
|
'md5': '5039ba9d26f6124a7fdea6df2f21e765',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '3vvn',
|
'id': '56b3d',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'fantasy solo',
|
'title': 'The Slut Maker HMV',
|
||||||
'description': 'dillion harper masturbates on a bed',
|
'description': 'Girls getting converted into cock slaves.',
|
||||||
'thumbnail': r're:^https?://.*\.jpg$',
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||||||
'uploader': 'silly2587',
|
'uploader': 'Mindself',
|
||||||
'timestamp': 1422571989,
|
'uploader_id': 'mindself',
|
||||||
'upload_date': '20150129',
|
'timestamp': 1617109572,
|
||||||
|
'upload_date': '20210330',
|
||||||
'age_limit': 18,
|
'age_limit': 18,
|
||||||
}
|
},
|
||||||
|
'params': {
|
||||||
|
# adaptive download
|
||||||
|
'skip_download': True,
|
||||||
|
},
|
||||||
}, {
|
}, {
|
||||||
# 480p only
|
# 480p only
|
||||||
'url': 'http://spankbang.com/1vt0/video/solvane+gangbang',
|
'url': 'http://spankbang.com/1vt0/video/solvane+gangbang',
|
||||||
@ -134,15 +139,15 @@ class SpankBangIE(InfoExtractor):
|
|||||||
info = self._search_json_ld(webpage, video_id, default={})
|
info = self._search_json_ld(webpage, video_id, default={})
|
||||||
|
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
r'(?s)<h1[^>]*>(.+?)</h1>', webpage, 'title', default=None)
|
r'(?s)<h1[^>]+\btitle=["\']([^"]+)["\']>', webpage, 'title', default=None)
|
||||||
description = self._search_regex(
|
description = self._search_regex(
|
||||||
r'<div[^>]+\bclass=["\']bottom[^>]+>\s*<p>[^<]*</p>\s*<p>([^<]+)',
|
r'<div[^>]+\bclass=["\']bottom[^>]+>\s*<p>[^<]*</p>\s*<p>([^<]+)',
|
||||||
webpage, 'description', default=None)
|
webpage, 'description', default=None)
|
||||||
thumbnail = self._og_search_thumbnail(webpage, default=None)
|
thumbnail = self._og_search_thumbnail(webpage, default=None)
|
||||||
uploader = self._html_search_regex(
|
uploader = self._html_search_regex(
|
||||||
(r'(?s)<li[^>]+class=["\']profile[^>]+>(.+?)</a>',
|
r'<svg[^>]+\bclass="(?:[^"]*?user[^"]*?)">.*?</svg>([^<]+)', webpage, 'uploader', default=None)
|
||||||
r'class="user"[^>]*><img[^>]+>([^<]+)'),
|
uploader_id = self._html_search_regex(
|
||||||
webpage, 'uploader', default=None)
|
r'<a[^>]+href="/profile/([^"]+)"', webpage, 'uploader_id', default=None)
|
||||||
duration = parse_duration(self._search_regex(
|
duration = parse_duration(self._search_regex(
|
||||||
r'<div[^>]+\bclass=["\']right_side[^>]+>\s*<span>([^<]+)',
|
r'<div[^>]+\bclass=["\']right_side[^>]+>\s*<span>([^<]+)',
|
||||||
webpage, 'duration', default=None))
|
webpage, 'duration', default=None))
|
||||||
@ -157,6 +162,7 @@ class SpankBangIE(InfoExtractor):
|
|||||||
'description': description,
|
'description': description,
|
||||||
'thumbnail': thumbnail,
|
'thumbnail': thumbnail,
|
||||||
'uploader': uploader,
|
'uploader': uploader,
|
||||||
|
'uploader_id': uploader_id,
|
||||||
'duration': duration,
|
'duration': duration,
|
||||||
'view_count': view_count,
|
'view_count': view_count,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
|
Loading…
Reference in New Issue
Block a user