diff --git a/epic-games.js b/epic-games.js index 16984a3..78675e3 100644 --- a/epic-games.js +++ b/epic-games.js @@ -227,7 +227,7 @@ 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 - await page.waitForSelector('text=Thanks for your order!'); + await page.locator('text=Thanks for your order!').waitFor({state: 'attached'}); db.data[user][game_id].status = 'claimed'; db.data[user][game_id].time = datetime(); // claimed time overwrites failed/dryrun time console.log(' Claimed successfully!');