diff options
author | Remita Amine <remitamine@gmail.com> | 2016-09-13 22:16:01 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2016-09-13 22:16:01 +0100 |
commit | 1b6712ab2378b2e8eb59f372fb51193f8d3bdc97 (patch) | |
tree | f6225aebfb9bf69c8768143a94b03957320d0abc /youtube_dl/extractor/common.py | |
parent | 8414c2da31a5ff3cc5ba84fdd537d714d04949f8 (diff) |
[adobepass] add specific options for adobe pass authentication
- add --ap-username and --ap-password option to specify
TV provider username and password in the cmd line
- add --ap-retries option to limit the number of retries
- add --list-ap-msi-ids to list the supported TV Providers
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r-- | youtube_dl/extractor/common.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 6edd5a769..ff19270ae 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -680,7 +680,7 @@ class InfoExtractor(object): return (username, password) - def _get_login_info(self): + def _get_login_info(self, username_option='username', password_option='password', netrc_machine=None): """ Get the login info as (username, password) It will look in the netrc file using the _NETRC_MACHINE value @@ -694,11 +694,11 @@ class InfoExtractor(object): downloader_params = self._downloader.params # Attempt to use provided username and password or .netrc data - if downloader_params.get('username') is not None: - username = downloader_params['username'] - password = downloader_params['password'] + if downloader_params.get(username_option) is not None: + username = downloader_params[username_option] + password = downloader_params[password_option] else: - username, password = self._get_netrc_login_info() + username, password = self._get_netrc_login_info(netrc_machine) return (username, password) |