We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8cf736 commit d5072a6Copy full SHA for d5072a6
gog.js
@@ -99,7 +99,8 @@ try {
99
console.log('Currently no free giveaway!');
100
} else {
101
const text = await page.locator('.giveaway__content-header').innerText();
102
- const title = text.match(/Claim (.*) and don't miss the/)[1];
+ const match_all = text.match(/Claim (.*) and don't miss the|Success! (.*) was added to/);
103
+ const title = match_all[1] ? match_all[1] : match_all[2];
104
const url = await banner.locator('a').first().getAttribute('href');
105
console.log(`Current free game: ${title} - ${url}`);
106
db.data[user][title] ||= { title, time: datetime(), url };
0 commit comments