aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/options.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2016-09-13 22:16:01 +0100
committerRemita Amine <remitamine@gmail.com>2016-09-13 22:16:01 +0100
commit1b6712ab2378b2e8eb59f372fb51193f8d3bdc97 (patch)
treef6225aebfb9bf69c8768143a94b03957320d0abc /youtube_dl/options.py
parent8414c2da31a5ff3cc5ba84fdd537d714d04949f8 (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/options.py')
-rw-r--r--youtube_dl/options.py24
1 files changed, 21 insertions, 3 deletions
diff --git a/youtube_dl/options.py b/youtube_dl/options.py
index c4057ce59..b99201a20 100644
--- a/youtube_dl/options.py
+++ b/youtube_dl/options.py
@@ -94,7 +94,7 @@ def parseOpts(overrideArguments=None):
setattr(parser.values, option.dest, value.split(','))
def _hide_login_info(opts):
- PRIVATE_OPTS = ['-p', '--password', '-u', '--username', '--video-password']
+ PRIVATE_OPTS = ['-p', '--password', '-u', '--username', '--video-password', '--ap-password', '--ap-username']
eqre = re.compile('^(?P<key>' + ('|'.join(re.escape(po) for po in PRIVATE_OPTS)) + ')=.+$')
def _scrub_eq(o):
@@ -350,10 +350,28 @@ def parseOpts(overrideArguments=None):
'--video-password',
dest='videopassword', metavar='PASSWORD',
help='Video password (vimeo, smotri, youku)')
- authentication.add_option(
+
+ adobe_pass = optparse.OptionGroup(parser, 'Adobe Pass Options')
+ adobe_pass.add_option(
'--ap-mso-id',
dest='ap_mso_id', metavar='APMSOID',
- help='Adobe Pass Multiple-system operator Identifier(DTV, Rogers)')
+ help='Adobe Pass Multiple-system operator Identifier')
+ adobe_pass.add_option(
+ '--ap-username',
+ dest='ap_username', metavar='APUSERNAME',
+ help='TV Provider Login with this account ID')
+ adobe_pass.add_option(
+ '--ap-password',
+ dest='ap_password', metavar='APPASSWORD',
+ help='TV Provider Account password. If this option is left out, youtube-dl will ask interactively.')
+ adobe_pass.add_option(
+ '--list-ap-mso-ids',
+ action='store_true', dest='list_ap_mso_ids', default=False,
+ help='List all supported TV Providers')
+ adobe_pass.add_option(
+ '--ap-retries',
+ dest='ap_retries', metavar='APRETRIES', default=3,
+ help='Number of retries for Adobe Pass Authorization requests')
video_format = optparse.OptionGroup(parser, 'Video Format Options')
video_format.add_option(