mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	| @@ -10,6 +10,8 @@ from ..compat import compat_HTTPError | ||||
| from ..utils import ( | ||||
|     ExtractorError, | ||||
|     int_or_none, | ||||
|     jwt_decode_hs256, | ||||
|     try_call, | ||||
|     try_get, | ||||
| ) | ||||
| 
 | ||||
| @@ -77,8 +79,10 @@ class SonyLIVIE(InfoExtractor): | ||||
|         self._HEADERS['device_id'] = self._get_device_id() | ||||
|         self._HEADERS['content-type'] = 'application/json' | ||||
| 
 | ||||
|         if username.lower() == 'token' and len(password) > 1198: | ||||
|         if username.lower() == 'token' and try_call(lambda: jwt_decode_hs256(password)): | ||||
|             self._HEADERS['authorization'] = password | ||||
|             self.report_login() | ||||
|             return | ||||
|         elif len(username) != 10 or not username.isdigit(): | ||||
|             raise ExtractorError(f'Invalid username/password; {self._LOGIN_HINT}') | ||||
| 
 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 bashonly
					bashonly