From 70b2b0d105a2d4a894da46bcde60d3a6242316a9 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Thu, 30 Jun 2022 16:36:14 +0200 Subject: [PATCH] prime-gaming: button text changed from Games to Prime Day -> use [data-type="Game"] instead --- prime-gaming.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prime-gaming.js b/prime-gaming.js index ebc6347..993e310 100644 --- a/prime-gaming.js +++ b/prime-gaming.js @@ -49,7 +49,7 @@ while (await page.locator('button:has-text("Sign in")').count() > 0) { if (!debug) context.setDefaultTimeout(TIMEOUT); } console.log('Signed in.'); -await page.click('button:has-text("Games")'); +await page.click('button[data-type="Game"]'); const games_sel = 'div[data-a-target="offer-list-FGWP_FULL"]'; await page.waitForSelector(games_sel); console.log('Number of already claimed games (total):', await page.locator(`${games_sel} p:has-text("Collected")`).count()); @@ -100,7 +100,7 @@ for (const card of games) { } // await page.pause(); await page.goto(URL_CLAIM, {waitUntil: 'domcontentloaded'}); - await page.click('button:has-text("Games")'); + await page.click('button[data-type="Game"]'); } while (n); } await context.close();