mirror of
https://github.com/Rushilwiz/SkoolOS.git
synced 2025-04-16 02:10:19 -04:00
fixed links
This commit is contained in:
parent
f77452c59d
commit
591af545ef
|
@ -17,7 +17,7 @@ import argparse
|
|||
|
||||
client_id = r'QeZPBSKqdvWFfBv1VYTSv9iFGz5T9pVJtNUjbEr6'
|
||||
client_secret = r'0Wl3hAIGY9SvYOqTOLUiLNYa4OlCgZYdno9ZbcgCT7RGQ8x2f1l2HzZHsQ7ijC74A0mrOhhCVeZugqAmOADHIv5fHxaa7GqFNtQr11HX9ySTw3DscKsphCVi5P71mlGY'
|
||||
redirect_uri = 'http://localhost:8000/'
|
||||
redirect_uri = 'http://localhost:8000/callback/'
|
||||
token_url = 'https://ion.tjhsst.edu/oauth/token/'
|
||||
scope = ["read"]
|
||||
|
||||
|
@ -49,10 +49,11 @@ def authenticate():
|
|||
#Linux: chromdriver-linux
|
||||
#Macos: chromdriver-mac
|
||||
#Windows: chromdriver.exe
|
||||
path = os.path.join(cdir, "chromedriver-mac")
|
||||
print(path)
|
||||
browser = webdriver.Chrome(path)
|
||||
browser = webdriver.Safari()
|
||||
#path = os.path.join(cdir, "chromedriver-linux")
|
||||
#print(path)
|
||||
#browser = webdriver.Chrome(path)
|
||||
browser = webdriver.Chrome()
|
||||
#browser = webdriver.Safari()
|
||||
|
||||
web_dir = os.path.join(os.path.dirname(__file__), 'oauth')
|
||||
os.chdir(web_dir)
|
||||
|
@ -72,11 +73,11 @@ def authenticate():
|
|||
|
||||
browser.get("localhost:8000/")
|
||||
|
||||
while "http://localhost:8000/?code" not in browser.current_url:
|
||||
while "http://localhost:8000/callback/?code" not in browser.current_url:
|
||||
time.sleep(0.25)
|
||||
|
||||
url = browser.current_url
|
||||
gets = url_decode(url.replace("http://localhost:8000/?", ""))
|
||||
gets = url_decode(url.replace("http://localhost:8000/callback/?", ""))
|
||||
code = gets.get("code")
|
||||
if state == gets.get("state"):
|
||||
state = gets.get("state")
|
||||
|
|
Loading…
Reference in New Issue
Block a user