epic-games: fix title sometimes being duplicated due to responsive alternative

This commit is contained in:
Ralf Vogler 2022-07-28 16:54:02 +02:00
parent f770ef5580
commit cf8746dc6c

View file

@ -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`);