From 8b5c360434b76ba520e06646adbf9cb386855175 Mon Sep 17 00:00:00 2001 From: KevinMatt <36391318+kevinmatthe@users.noreply.github.com> Date: Sun, 27 Aug 2023 15:04:32 +0800 Subject: [PATCH] Update epic-games.js Adding async handle in captcha notify --- epic-games.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epic-games.js b/epic-games.js index f828031..9211042 100644 --- a/epic-games.js +++ b/epic-games.js @@ -79,9 +79,9 @@ try { await page.fill('#email', email); await page.fill('#password', password); await page.click('button[type="submit"]'); - page.waitForSelector('#h_captcha_challenge_login_prod iframe').then(() => { + page.waitForSelector('#h_captcha_challenge_login_prod iframe').then(async () => { console.error('Got a captcha during login (likely due to too many attempts)! You may solve it in the browser, get a new IP or try again in a few hours.'); - notify('epic-games: got captcha during login. Please check.'); + await notify('epic-games: got captcha during login. Please check.'); }).catch(_ => { }); // handle MFA, but don't await it page.waitForURL('**/id/login/mfa**').then(async () => {