From d4ebdd091a478fb55cbde658f775f71baa6ab451 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Tue, 5 Sep 2023 15:59:17 +0200 Subject: [PATCH] pg: log current game in claim loop, not data loop --- prime-gaming.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prime-gaming.js b/prime-gaming.js index 21b18fc..3a02bbe 100644 --- a/prime-gaming.js +++ b/prime-gaming.js @@ -126,11 +126,11 @@ try { const title = await card.locator('.item-card-details__body__primary').innerText(); const slug = await card.locator('a:has-text("Claim")').first().getAttribute('href'); const url = 'https://gaming.amazon.com' + slug.split('?')[0]; - console.log('Current free game:', title); //, url); // await (await card.$('text=Claim')).click(); // goes to URL of game, no need to wait external_info.push({title, url}); } for (const {title, url} of external_info) { + console.log('Current free game:', title); //, url); await page.goto(url, { waitUntil: 'domcontentloaded' }); if (cfg.debug) await page.pause(); if (cfg.dryrun) continue;