Skip to content

Commit

Permalink
Fix login argument parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAplin committed Jan 28, 2019
1 parent 88bf276 commit fb9d38f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions nndownload.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,14 +700,13 @@ def main():
account_password = account_credentials[2]
else:
raise netrc.NetrcParseError("No authenticator available for {}".format(HOST))

if cmdl_opts.no_login:
output("Proceeding with no login. Some videos may not be available for download or may only be available in low quality. For access to all videos, please provide a login with --username/--password or -netrc.\n", logging.WARNING)
else:
elif not cmdl_opts.no_login:
if not account_username:
account_username = input("Username: ")
if not account_password:
account_password = getpass.getpass("Password: ")
else:
output("Proceeding with no login. Some videos may not be available for download or may only be available in low quality. For access to all videos, please provide a login with --username/--password or --netrc.\n", logging.WARNING)

session = login(account_username, account_password)
if url_mo:
Expand Down

0 comments on commit fb9d38f

Please sign in to comment.