From cf8746dc6c26e481d04411d1a42dbe1a3feb7a5f Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Thu, 28 Jul 2022 16:54:02 +0200 Subject: [PATCH] epic-games: fix title sometimes being duplicated due to responsive alternative --- epic-games.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epic-games.js b/epic-games.js index 4ef1b47..27a6dd5 100644 --- a/epic-games.js +++ b/epic-games.js @@ -71,7 +71,7 @@ try { console.log('This game contains mature content recommended only for ages 18+'); await page.click('button:has-text("Continue")'); } - const title = await page.locator('h1').first().innerText(); + const title = await page.locator('h1 div').first().innerText(); console.log('Current free game:', title); const title_url = page.url().split('/').pop(); const p = path.resolve(dirs.screenshots, 'epic-games', `${title_url}.png`);