From 9ef9798626c7f6108b0eb76cb651f8027f7a6931 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Thu, 23 May 2024 15:55:07 +0200 Subject: [PATCH] eg: detect 'Failed to challenge captcha, please try again later.' --- epic-games.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epic-games.js b/epic-games.js index 3ead561..54ca597 100644 --- a/epic-games.js +++ b/epic-games.js @@ -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