diff options
Diffstat (limited to 'yt_dlp/extractor/spankbang.py')
-rw-r--r-- | yt_dlp/extractor/spankbang.py | 11 |
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, ) |