From 290fe289d4dac79e595f5bddf9ed54a72dd75a2a Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Tue, 16 May 2023 13:31:53 +0200 Subject: [PATCH] pg: fix #142: `PG_CLAIMDLC` locator 'a' resolved to 2 elements --- prime-gaming.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prime-gaming.js b/prime-gaming.js index 4330cd9..8390fd5 100644 --- a/prime-gaming.js +++ b/prime-gaming.js @@ -259,7 +259,7 @@ try { const dlcs = await Promise.all(cards.map(async card => ({ game: await card.locator('.item-card-details__body p').innerText(), title: await card.locator('.item-card-details__body__primary').innerText(), - url: 'https://gaming.amazon.com' + await card.locator('a').getAttribute('href'), + url: 'https://gaming.amazon.com' + await card.locator('a').first().getAttribute('href'), }))); // console.log(dlcs);