gog: Claim (.*) and don't miss -> Claim (.*), fixes #60

This commit is contained in:
Ralf Vogler 2023-02-15 19:33:44 +01:00
parent ec2d31ed79
commit a90062b631

2
gog.js
View file

@ -87,7 +87,7 @@ try {
console.log('Currently no free giveaway!'); console.log('Currently no free giveaway!');
} else { } else {
const text = await page.locator('.giveaway-banner__title').innerText(); const text = await page.locator('.giveaway-banner__title').innerText();
const title = text.match(/Claim (.*) and don't miss/)[1]; const title = text.match(/Claim (.*)/)[1];
const slug = await banner.getAttribute('href'); const slug = await banner.getAttribute('href');
const url = `https://gog.com${slug}`; const url = `https://gog.com${slug}`;
console.log(`Current free game: ${title} - ${url}`); console.log(`Current free game: ${title} - ${url}`);