dev #1

Merged
nocci merged 51 commits from dev into main 2026-03-06 16:31:29 +01:00
Showing only changes of commit af90aa7c42 - Show all commits

View file

@ -15,6 +15,7 @@ import {
} from './src/util.js';
import { cfg } from './src/config.js';
const URL_CLAIM = 'https://store.epicgames.com/en-US/free-games';
const COOKIES_PATH = path.resolve(cfg.dir.browser, 'epic-cookies.json');
const BEARER_TOKEN_NAME = 'EPIC_BEARER_TOKEN';
@ -292,8 +293,8 @@ const claimGame = async (page, game) => {
notify_game.status = 'claimed';
} catch (e) {
notify_game.status = 'failed';
const p = screenshot('failed', `${game.offerId || game.pageSlug}_${filenamify(datetime())}.png`);
await page.screenshot({ path: p, fullPage: true }).catch(() => { });
const screenshotPath = path.resolve(cfg.dir.screenshots, 'epic-games', 'failed', `${game.offerId || game.pageSlug}_${filenamify(datetime())}.png`);
await page.screenshot({ path: screenshotPath, fullPage: true }).catch(() => { });
console.error(' Failed to claim:', e.message);
}
@ -378,3 +379,4 @@ export const claimEpicGamesNew = async () => {
};
export default claimEpicGamesNew;