from .common import InfoExtractor
from ..utils import (
- determine_ext,
ExtractorError,
+ determine_ext,
merge_dicts,
parse_duration,
parse_resolution,
'timestamp': 1617109572,
'upload_date': '20210330',
'age_limit': 18,
- }
+ },
}, {
# 480p only
'url': 'http://spankbang.com/1vt0/video/solvane+gangbang',
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 = []
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:
'view_count': view_count,
'formats': formats,
'age_limit': age_limit,
- }, info
+ }, info,
)