From 137f07c27a88b07df57df5b2cdebebe3c7722bac Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 5 Aug 2024 11:06:10 +0200 Subject: Merging upstream version 2024.07.01. Signed-off-by: Daniel Baumann --- yt_dlp/extractor/spankbang.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'yt_dlp/extractor/spankbang.py') 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[^\s=]+)\s*=\s*(["\'])(?P(?:(?!\2).)+)\2' - % STREAM_URL_PREFIX, webpage): + rf'{STREAM_URL_PREFIX}(?P[^\s=]+)\s*=\s*(["\'])(?P(?:(?!\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, ) -- cgit v1.2.3