mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 14:45:14 +00:00 
			
		
		
		
	[cleanup] Add more ruff rules (#10149)
Authored by: seproDev Reviewed-by: bashonly <88596187+bashonly@users.noreply.github.com> Reviewed-by: Simon Sawicki <contact@grub4k.xyz>
This commit is contained in:
		| @@ -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, | ||||
|         ) | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 sepro
					sepro