eg: include link to game in captcha notification, closes #259

TODO use purchaseURL from https://github.com/vogler/free-games-claimer/pull/130
This commit is contained in:
Ralf Vogler 2023-12-19 11:52:35 +01:00
parent 9c89bf06a4
commit 76597f4315

View file

@ -228,7 +228,7 @@ try {
captcha.waitFor().then(async () => { // don't await, since element may not be shown captcha.waitFor().then(async () => { // don't await, since element may not be shown
// console.info(' Got hcaptcha challenge! NopeCHA extension will likely solve it.') // console.info(' Got hcaptcha challenge! NopeCHA extension will likely solve it.')
console.error(' Got hcaptcha challenge! Lost trust due to too many login attempts? You can solve the captcha in the browser or get a new IP address.'); console.error(' Got hcaptcha challenge! Lost trust due to too many login attempts? You can solve the captcha in the browser or get a new IP address.');
await notify('epic-games: got captcha challenge right before claim. Use VNC to solve it manually.'); await notify(`epic-games: got captcha challenge right before claim of <a href="${url}">${title}</a>. Use VNC to solve it manually.`); // TODO could even create purchase URL, see https://github.com/vogler/free-games-claimer/pull/130
// await page.waitForTimeout(2000); // await page.waitForTimeout(2000);
// const p = path.resolve(cfg.dir.screenshots, 'epic-games', 'captcha', `${filenamify(datetime())}.png`); // const p = path.resolve(cfg.dir.screenshots, 'epic-games', 'captcha', `${filenamify(datetime())}.png`);
// await captcha.screenshot({ path: p }); // await captcha.screenshot({ path: p });