mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-30 22:25:19 +00:00 
			
		
		
		
	[extractor] Add _perform_login function (#2943)
				
					
				
			* Adds new functions `_initialize_pre_login` and `_perform_login` as part of the extractor API * Adds `ie.supports_login` to the public API
This commit is contained in:
		| @@ -29,11 +29,7 @@ from .youtube import YoutubeIE | ||||
| class VKBaseIE(InfoExtractor): | ||||
|     _NETRC_MACHINE = 'vk' | ||||
|  | ||||
|     def _login(self): | ||||
|         username, password = self._get_login_info() | ||||
|         if username is None: | ||||
|             return | ||||
|  | ||||
|     def _perform_login(self, username, password): | ||||
|         login_page, url_handle = self._download_webpage_handle( | ||||
|             'https://vk.com', None, 'Downloading login page') | ||||
|  | ||||
| @@ -57,9 +53,6 @@ class VKBaseIE(InfoExtractor): | ||||
|             raise ExtractorError( | ||||
|                 'Unable to login, incorrect username and/or password', expected=True) | ||||
|  | ||||
|     def _real_initialize(self): | ||||
|         self._login() | ||||
|  | ||||
|     def _download_payload(self, path, video_id, data, fatal=True): | ||||
|         data['al'] = 1 | ||||
|         code, payload = self._download_json( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan