gettoken.py WORKING IN MY GENTOO
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
parent
90f154f23b
commit
ebacbe892d
@ -6,8 +6,12 @@ from urllib.parse import parse_qs
|
||||
import sys
|
||||
import requests as r
|
||||
|
||||
no_browser = False
|
||||
|
||||
if len(sys.argv) > 1 :
|
||||
API_ADDRESS = "http://" + sys.argv[1] + ":1285"
|
||||
if (sys.argv[1] == "no-browser" or sys.argv[2] == "no-browser"):
|
||||
no_browser = True
|
||||
else:
|
||||
API_ADDRESS = "http://localhost:1285"
|
||||
|
||||
@ -39,5 +43,6 @@ def wait_for_request(server_class=HTTPServer,
|
||||
url = 'https://cas.amu.edu.pl/cas/login?service=http://localhost:' + \
|
||||
str(PORT) + '&locale=pl'
|
||||
|
||||
if no_browser == False:
|
||||
webbrowser.open_new_tab(url)
|
||||
wait_for_request()
|
||||
|
Loading…
Reference in New Issue
Block a user