[youtube] Add two-factor account signin (TOTP only)
Additional work is required to prompt the user for the SMS or phone call codes, as there is no framework currently to prompt the user during an extraction operation. Fixes #3533
This commit is contained in:
parent
c1d293cfa6
commit
83317f6938
3 changed files with 94 additions and 1 deletions
|
@ -434,6 +434,24 @@ class InfoExtractor(object):
|
|||
|
||||
return (username, password)
|
||||
|
||||
def _get_tfa_info(self):
|
||||
"""
|
||||
Get the two-factor authentication info
|
||||
TODO - asking the user will be required for sms/phone verify
|
||||
currently just uses the command line option
|
||||
If there's no info available, return None
|
||||
"""
|
||||
if self._downloader is None:
|
||||
self.to_screen("no downloader")
|
||||
return None
|
||||
downloader_params = self._downloader.params
|
||||
|
||||
if downloader_params.get('twofactor', None) is not None:
|
||||
return downloader_params['twofactor']
|
||||
|
||||
self.to_screen("param is None")
|
||||
return None
|
||||
|
||||
# Helper functions for extracting OpenGraph info
|
||||
@staticmethod
|
||||
def _og_regexes(prop):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue