epic-games: captcha on login: await notify (#195)

Adding async handle in captcha notify
This commit is contained in:
KevinMatt 2023-08-28 15:16:30 +08:00 committed by GitHub
parent 9261be690c
commit 6bb1dca934
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 () => {