Skip to content

Commit

Permalink
eg: detect 'Failed to challenge captcha, please try again later.'
Browse files Browse the repository at this point in the history
  • Loading branch information
vogler committed May 23, 2024
1 parent e49fa93 commit 9ef9798
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions epic-games.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ try {
// console.info(' Saved a screenshot of hcaptcha challenge to', p);
// console.error(' Got hcaptcha challenge. To avoid it, get a link from https://www.hcaptcha.com/accessibility'); // TODO save this link in config and visit it daily to set accessibility cookie to avoid captcha challenge?
}).catch(_ => { }); // may time out if not shown
iframe.locator('.payment__errors:has-text("Failed to challenge captcha, please try again later.")').waitFor().then(async () => {
console.error(' Failed to challenge captcha, please try again later.');
await notify('epic-games: failed to challenge captcha. Please check.');
});
await page.locator('text=Thanks for your order!').waitFor({ state: 'attached' }); // TODO Bundle: got stuck here
db.data[user][game_id].status = 'claimed';
db.data[user][game_id].time = datetime(); // claimed time overwrites failed/dryrun time
Expand Down

0 comments on commit 9ef9798

Please sign in to comment.