Skip to content

Commit 7d39cb6

Browse files
committed
Fix duo trust browser button issue
1 parent d4bde2f commit 7d39cb6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

PhotoScraper/RPI_SIS_PhotoScraper.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def login():
8585
passwd = f.readline().strip()
8686
else:
8787
rcsid = input("RCS ID: ")
88-
passwd = getpass.getpass("Password: ")
88+
passwd = getpass.getpass("RCS Password: ")
8989

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

108108
print("2FA: enter code on your phone", file=sys.stderr)
109109
driver.implicitly_wait(25)
110-
driver.find_element(By.ID, "dont-trust-browser-button").click()
110+
driver.find_element(
111+
By.CSS_SELECTOR,
112+
"#dont-trust-browser-button,a[href='/rss/twbkwbis.P_GenMenu?name=bmenu.P_MainMnu']",
113+
).click()
111114
driver.implicitly_wait(10)
112115
driver.find_element(
113116
By.CSS_SELECTOR, 'a[href="/rss/twbkwbis.P_GenMenu?name=bmenu.P_MainMnu"]'
114-
)
117+
).click()
115118

116119
return driver, True
117120
except NoSuchElementException:

0 commit comments

Comments
 (0)