summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/spankbang.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
commit137f07c27a88b07df57df5b2cdebebe3c7722bac (patch)
tree4ebdcbea6b540f69c40ba0be6ac766008030d149 /yt_dlp/extractor/spankbang.py
parentAdding debian version 2024.05.27-1. (diff)
downloadyt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.tar.xz
yt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.zip
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/spankbang.py')
-rw-r--r--yt_dlp/extractor/spankbang.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/yt_dlp/extractor/spankbang.py b/yt_dlp/extractor/spankbang.py
index c73f797..6805a72 100644
--- a/yt_dlp/extractor/spankbang.py
+++ b/yt_dlp/extractor/spankbang.py
@@ -37,7 +37,7 @@ class SpankBangIE(InfoExtractor):
'timestamp': 1617109572,
'upload_date': '20210330',
'age_limit': 18,
- }
+ },
}, {
# 480p only
'url': 'http://spankbang.com/1vt0/video/solvane+gangbang',
@@ -72,12 +72,12 @@ class SpankBangIE(InfoExtractor):
mobj = self._match_valid_url(url)
video_id = mobj.group('id') or mobj.group('id_2')
webpage = self._download_webpage(
- url.replace('/%s/embed' % video_id, '/%s/video' % video_id),
+ url.replace(f'/{video_id}/embed', f'/{video_id}/video'),
video_id, headers={'Cookie': 'country=US'})
if re.search(r'<[^>]+\b(?:id|class)=["\']video_removed', webpage):
raise ExtractorError(
- 'Video %s is not available' % video_id, expected=True)
+ f'Video {video_id} is not available', expected=True)
formats = []
@@ -104,8 +104,7 @@ class SpankBangIE(InfoExtractor):
STREAM_URL_PREFIX = 'stream_url_'
for mobj in re.finditer(
- r'%s(?P<id>[^\s=]+)\s*=\s*(["\'])(?P<url>(?:(?!\2).)+)\2'
- % STREAM_URL_PREFIX, webpage):
+ rf'{STREAM_URL_PREFIX}(?P<id>[^\s=]+)\s*=\s*(["\'])(?P<url>(?:(?!\2).)+)\2', webpage):
extract_format(mobj.group('id', 'url'))
if not formats:
@@ -159,7 +158,7 @@ class SpankBangIE(InfoExtractor):
'view_count': view_count,
'formats': formats,
'age_limit': age_limit,
- }, info
+ }, info,
)