X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2F__init__.py;h=80de211e75ea266d08bdc4c1bc8236bdd0741c24;hb=83317f693870424c2c769e4d964453401063fdf1;hp=962aedbff7d47c8d51511a6a1c76d5db65b4e9da;hpb=c1d293cfa68031e0ec1a4190041f280d22c2b026;p=youtube-dl diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 962aedbff..80de211e7 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -314,6 +314,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', @@ -748,6 +750,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,