Skip to content

Commit

Permalink
Fix duo trust browser button issue
Browse files Browse the repository at this point in the history
  • Loading branch information
powe97 committed Jul 18, 2024
1 parent d4bde2f commit 7d39cb6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions PhotoScraper/RPI_SIS_PhotoScraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def login():
passwd = f.readline().strip()
else:
rcsid = input("RCS ID: ")
passwd = getpass.getpass("Password: ")
passwd = getpass.getpass("RCS Password: ")

print("Setting up selenium", file=sys.stderr)
driver = webdriver.Chrome(options=chrome_options)
Expand All @@ -107,11 +107,14 @@ def login():

print("2FA: enter code on your phone", file=sys.stderr)
driver.implicitly_wait(25)
driver.find_element(By.ID, "dont-trust-browser-button").click()
driver.find_element(
By.CSS_SELECTOR,
"#dont-trust-browser-button,a[href='/rss/twbkwbis.P_GenMenu?name=bmenu.P_MainMnu']",
).click()
driver.implicitly_wait(10)
driver.find_element(
By.CSS_SELECTOR, 'a[href="/rss/twbkwbis.P_GenMenu?name=bmenu.P_MainMnu"]'
)
).click()

return driver, True
except NoSuchElementException:
Expand Down

0 comments on commit 7d39cb6

Please sign in to comment.