aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/ark/gift-shot.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/ark/gift-shot.js b/tools/ark/gift-shot.js
index 948854c..3ebb21f 100644
--- a/tools/ark/gift-shot.js
+++ b/tools/ark/gift-shot.js
@@ -17,6 +17,7 @@ for (let i = 0; i < 30; i++) { try { if ((await fetch(APP)).ok) break; } catch {
const browser = await puppeteer.launch({ executablePath: '/usr/bin/google-chrome', headless: 'new', args: ['--no-sandbox'] });
const page = await browser.newPage();
+page.on('pageerror', (e) => console.log('[pageerror]', e.message));
await page.setViewport({ width: 420, height: 860, deviceScaleFactor: 2 });
const clickText = (sel, text) => page.evaluate((sel, text) => {
const el = [...document.querySelectorAll(sel)].find((e) => e.textContent.trim().toLowerCase().includes(text.toLowerCase()));