diff --git a/epic-games.js b/epic-games.js index 6015285..cd79284 100644 --- a/epic-games.js +++ b/epic-games.js @@ -9,7 +9,7 @@ const TIMEOUT = 20 * 1000; // 20s, default is 30s // could change to .mjs to get top-level-await, but would then also need to change require to import and dynamic import for stealth below would just add more async/await (async () => { // https://playwright.dev/docs/auth#multi-factor-authentication - const context = await chromium.launchPersistentContext('userDataDir', { + const context = await chromium.launchPersistentContext(`${__dirname}\\userDataDir`, { channel: 'chrome', // https://playwright.dev/docs/browsers#google-chrome--microsoft-edge headless: false, viewport: { width: 1280, height: 1280 }, diff --git a/prime-gaming.js b/prime-gaming.js index 912855e..b37e053 100644 --- a/prime-gaming.js +++ b/prime-gaming.js @@ -9,7 +9,7 @@ const TIMEOUT = 20 * 1000; // 20s, default is 30s // could change to .mjs to get top-level-await, but would then also need to change require to import and dynamic import for stealth below would just add more async/await (async () => { // https://playwright.dev/docs/auth#multi-factor-authentication - const context = await chromium.launchPersistentContext('userDataDir', { + const context = await chromium.launchPersistentContext(`${__dirname}\\userDataDir`, { channel: 'chrome', // https://playwright.dev/docs/browsers#google-chrome--microsoft-edge headless: false, viewport: { width: 1280, height: 1280 },