gog: screenshot: wait for not is-loading
This commit is contained in:
parent
74bd2f538a
commit
7520bf1976
1 changed files with 1 additions and 0 deletions
1
gog.js
1
gog.js
|
|
@ -98,6 +98,7 @@ try {
|
|||
console.log(`Current free game: ${title} - ${url}`);
|
||||
db.data[user][title] ||= { title, time: datetime(), url };
|
||||
if (cfg.dryrun) process.exit(1);
|
||||
await page.locator('#giveaway:not(.is-loading)').waitFor(); // otherwise screenshot is sometimes with loading indicator instead of game title
|
||||
const p = path.resolve(cfg.dir.screenshots, 'gog', `${filenamify(title)}.png`);
|
||||
await banner.screenshot({ path: p }); // overwrites every time - only keep first?
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue