From 33698e7a7be5ec5b3c82f5e0cab8c9424bec982c Mon Sep 17 00:00:00 2001 From: Joubin Jabbari Date: Fri, 23 Dec 2016 19:26:14 -0800 Subject: [PATCH] Fixed an error in the code where options where removed by accident --- audible-activator.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/audible-activator.py b/audible-activator.py index ce75a39..b37ff38 100755 --- a/audible-activator.py +++ b/audible-activator.py @@ -135,9 +135,23 @@ if __name__ == "__main__": dest="two_factor", default=False, help="Use this option to enable two factor authentication",) + parser.add_option("--username", + action="store", + dest="username", + default=False, + help="Audible username, use along with the --password option") + parser.add_option("--password", + action="store", + dest="password", + default=False, + help="Audible password") (options, args) = parser.parse_args() - username = raw_input("Username: ") - password = getpass("Password: ") + if options.username and options.password: + username = options.username + password = options.password + else: + username = raw_input("Username: ") + password = getpass("Password: ") fetch_activation_bytes(username, password, options)