diff --git a/epic-claimer-new.js b/epic-claimer-new.js index fbc212a..313892e 100644 --- a/epic-claimer-new.js +++ b/epic-claimer-new.js @@ -140,7 +140,9 @@ const ensureLoggedIn = async (page, context) => { await passwordField.fill(cfg.eg_password); const rememberMe = page.locator('input[name="rememberMe"], #rememberMe'); if (await rememberMe.count()) await rememberMe.check().catch(() => {}); - await page.click('button[type="submit"]'); + await continueBtn.first().click().catch(async () => { + await page.click('button[type="submit"]').catch(() => {}); + }); // MFA step try { @@ -156,7 +158,9 @@ const ensureLoggedIn = async (page, context) => { } else { await page.locator('input[name="code-input-0"]').pressSequentially(otp.toString()); } - await page.click('button[type="submit"]'); + await continueBtn.first().click().catch(async () => { + await page.click('button[type="submit"]').catch(() => {}); + }); } catch { // no MFA }