pg: log current game in claim loop, not data loop
This commit is contained in:
parent
d8e2093a0d
commit
d4ebdd091a
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue