Skip to content

Commit 7ffdd61

Browse files
committed
pg: indent logging per game
1 parent 569e690 commit 7ffdd61

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

prime-gaming.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ try {
102102
// Full game for PC [and MAC] on: gog.com, Origin, Legacy Games, EPIC GAMES, Battle.net
103103
// 3 Full PC Games on Legacy Games
104104
const store = store_text.toLowerCase().replace(/.* on /, '');
105-
console.log('External store:', store);
105+
console.log(' External store:', store);
106106
if (await page.locator('div:has-text("Link game account")').count()) {
107-
console.error('Account linking is required to claim this offer!');
107+
console.error(' Account linking is required to claim this offer!');
108108
} else {
109109
// print code if there is one
110110
const redeem = {
@@ -115,17 +115,17 @@ try {
115115
let code;
116116
if (store in redeem) { // did not work for linked origin: && !await page.locator('div:has-text("Successfully Claimed")').count()
117117
code = await page.inputValue('input[type="text"]');
118-
console.log('Code to redeem game:', code);
118+
console.log(' Code to redeem game:', code);
119119
if (store == 'legacy games') { // may be different URL like https://legacygames.com/primeday/puzzleoftheyear/
120120
redeem[store] = await (await page.$('li:has-text("Click here") a')).getAttribute('href');
121121
}
122-
console.log('URL to redeem game:', redeem[store]);
122+
console.log(' URL to redeem game:', redeem[store]);
123123
}
124124
db.data.claimed.push({ title, time: datetime(), store, code, url: page.url() });
125125
// save screenshot of potential code just in case
126126
const p = path.resolve(dirs.screenshots, 'prime-gaming', 'external', `${filenamify(title)}.png`);
127127
await page.screenshot({ path: p, fullPage: true });
128-
console.info('Saved a screenshot of page to', p);
128+
// console.info(' Saved a screenshot of page to', p);
129129
run.c_external++;
130130
}
131131
// await page.pause();

0 commit comments

Comments
 (0)