mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +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:
		| @@ -14,7 +14,7 @@ from ..utils import ( | ||||
| class VideoPressIE(InfoExtractor): | ||||
|     _ID_REGEX = r'[\da-zA-Z]{8}' | ||||
|     _PATH_REGEX = r'video(?:\.word)?press\.com/embed/' | ||||
|     _VALID_URL = r'https?://%s(?P<id>%s)' % (_PATH_REGEX, _ID_REGEX) | ||||
|     _VALID_URL = rf'https?://{_PATH_REGEX}(?P<id>{_ID_REGEX})' | ||||
|     _EMBED_REGEX = [rf'<iframe[^>]+src=["\'](?P<url>(?:https?://)?{_PATH_REGEX}{_ID_REGEX})'] | ||||
|     _TESTS = [{ | ||||
|         'url': 'https://videopress.com/embed/kUJmAcSf', | ||||
| @@ -44,7 +44,7 @@ class VideoPressIE(InfoExtractor): | ||||
|         query = random_birthday('birth_year', 'birth_month', 'birth_day') | ||||
|         query['fields'] = 'description,duration,file_url_base,files,height,original,poster,rating,title,upload_date,width' | ||||
|         video = self._download_json( | ||||
|             'https://public-api.wordpress.com/rest/v1.1/videos/%s' % video_id, | ||||
|             f'https://public-api.wordpress.com/rest/v1.1/videos/{video_id}', | ||||
|             video_id, query=query) | ||||
| 
 | ||||
|         title = video['title'] | ||||
| @@ -63,7 +63,7 @@ class VideoPressIE(InfoExtractor): | ||||
|                 if ext in ('mp4', 'ogg'): | ||||
|                     formats.append({ | ||||
|                         'url': urljoin(base_url, path), | ||||
|                         'format_id': '%s-%s' % (format_id, ext), | ||||
|                         'format_id': f'{format_id}-{ext}', | ||||
|                         'ext': determine_ext(path, ext), | ||||
|                         'quality': quality(format_id), | ||||
|                     }) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 sepro
					sepro