-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#4 provide username from command line
- Loading branch information
Showing
1 changed file
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,17 @@ | |
import time | ||
import os | ||
import subprocess | ||
import argparse | ||
|
||
username = input("UH username: ") | ||
parser = argparse.ArgumentParser(description='Connect to the UH VPN from the command line,' +\ | ||
' obtaining the authentification cookie through a browser' +\ | ||
' that is controlled through Selenium.') | ||
parser.add_argument('-u','--username', help="UH username ([email protected])") | ||
args = parser.parse_args() | ||
|
||
username = args.username | ||
if not username: | ||
username = input("UH username: ") | ||
pw = getpass('UH password: ') | ||
service = Service(executable_path=ChromeDriverManager().install()) | ||
options = Options() | ||
|
9686a8e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implements solution to #4