Skip to content

Commit

Permalink
eg: changed: move password fill and fix captcha locators, #260
Browse files Browse the repository at this point in the history
  • Loading branch information
vogler committed Dec 21, 2023
1 parent bdc305a commit 19e9bb9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions epic-games.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ try {
// await page.click('text=Sign in with Epic Games');
await page.fill('#email', email);
await page.click('button[type="submit"]');
await page.fill('#password', password);
await page.click('button[type="submit"]');
page.waitForSelector('#h_captcha_challenge_login_prod iframe').then(async () => {
page.waitForSelector('.h_captcha_challenge 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.');
await notify('epic-games: got captcha during login. Please check.');
}).catch(_ => { });
page.waitForSelector('h6:has-text("Incorrect response.")').then(async () => {
page.waitForSelector('p:has-text("Incorrect response.")').then(async () => {
console.error('Incorrect repsonse for captcha!');
}).catch(_ => { });
await page.fill('#password', password);
await page.click('button[type="submit"]');
// handle MFA, but don't await it
page.waitForURL('**/id/login/mfa**').then(async () => {
console.log('Enter the security code to continue - This appears to be a new device, browser or location. A security code has been sent to your email address at ...');
Expand Down

0 comments on commit 19e9bb9

Please sign in to comment.