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:
		| @@ -1,5 +1,4 @@ | ||||
| from .common import InfoExtractor | ||||
| from ..compat import compat_str | ||||
| from ..networking.exceptions import HTTPError | ||||
| from ..utils import ( | ||||
|     ExtractorError, | ||||
| @@ -21,7 +20,7 @@ class TVPlayerIE(InfoExtractor): | ||||
|         'params': { | ||||
|             # m3u8 download | ||||
|             'skip_download': True, | ||||
|         } | ||||
|         }, | ||||
|     } | ||||
| 
 | ||||
|     def _real_extract(self, url): | ||||
| @@ -48,7 +47,7 @@ class TVPlayerIE(InfoExtractor): | ||||
| 
 | ||||
|         validate = context['validate'] | ||||
|         platform = try_get( | ||||
|             context, lambda x: x['platform']['key'], compat_str) or 'firefox' | ||||
|             context, lambda x: x['platform']['key'], str) or 'firefox' | ||||
| 
 | ||||
|         try: | ||||
|             response = self._download_json( | ||||
| @@ -66,7 +65,7 @@ class TVPlayerIE(InfoExtractor): | ||||
|                 response = self._parse_json( | ||||
|                     e.cause.response.read().decode(), resource_id)['tvplayer']['response'] | ||||
|                 raise ExtractorError( | ||||
|                     '%s said: %s' % (self.IE_NAME, response['error']), expected=True) | ||||
|                     '{} said: {}'.format(self.IE_NAME, response['error']), expected=True) | ||||
|             raise | ||||
| 
 | ||||
|         formats = self._extract_m3u8_formats(response['stream'], display_id, 'mp4') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 sepro
					sepro