aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-08-24 07:14:23 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-08-24 07:14:23 +0200
commit9480d1a56674f95f135562d2133cbf12f6a96bbc (patch)
tree08ebbee48fe59abce99aa4035e9d334f6b34c148 /youtube_dl/__init__.py
parent36b0079f23b35f99d3b8b72028f3cea048d61566 (diff)
parent165250ff5e33d1b246dffaade23b31b4fa3f3b02 (diff)
Merge remote-tracking branch 'riking/twofactor'
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index d24157ba6..a96bf9b5c 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -318,6 +318,8 @@ def parseOpts(overrideArguments=None):
dest='username', metavar='USERNAME', help='account username')
authentication.add_option('-p', '--password',
dest='password', metavar='PASSWORD', help='account password')
+ authentication.add_option('-2', '--twofactor',
+ dest='twofactor', metavar='TWOFACTOR', help='two-factor auth code')
authentication.add_option('-n', '--netrc',
action='store_true', dest='usenetrc', help='use .netrc authentication data', default=False)
authentication.add_option('--video-password',
@@ -752,6 +754,7 @@ def _real_main(argv=None):
'usenetrc': opts.usenetrc,
'username': opts.username,
'password': opts.password,
+ 'twofactor': opts.twofactor,
'videopassword': opts.videopassword,
'quiet': (opts.quiet or any_printing),
'no_warnings': opts.no_warnings,