eg: detect 'Failed to challenge captcha, please try again later.'
This commit is contained in:
parent
e49fa930e0
commit
9ef9798626
1 changed files with 4 additions and 0 deletions
|
|
@ -251,6 +251,10 @@ try {
|
||||||
// console.info(' Saved a screenshot of hcaptcha challenge to', p);
|
// 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?
|
// 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
|
}).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
|
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].status = 'claimed';
|
||||||
db.data[user][game_id].time = datetime(); // claimed time overwrites failed/dryrun time
|
db.data[user][game_id].time = datetime(); // claimed time overwrites failed/dryrun time
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue