diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-08-24 07:14:23 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-08-24 07:14:23 +0200 |
commit | 9480d1a56674f95f135562d2133cbf12f6a96bbc (patch) | |
tree | 08ebbee48fe59abce99aa4035e9d334f6b34c148 /youtube_dl/extractor/common.py | |
parent | 36b0079f23b35f99d3b8b72028f3cea048d61566 (diff) | |
parent | 165250ff5e33d1b246dffaade23b31b4fa3f3b02 (diff) |
Merge remote-tracking branch 'riking/twofactor'
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r-- | youtube_dl/extractor/common.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 9d85a538c..4d5b48167 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -440,6 +440,22 @@ 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: + return None + downloader_params = self._downloader.params + + if downloader_params.get('twofactor', None) is not None: + return downloader_params['twofactor'] + + return None + # Helper functions for extracting OpenGraph info @staticmethod def _og_regexes(prop): |