diff --git a/config.js b/config.js index 0962159..bd41c7d 100644 --- a/config.js +++ b/config.js @@ -6,6 +6,7 @@ dotenv.config({ path: 'data/config.env' }); // loads env vars from file - will n // Options - also see table in README.md export const cfg = { debug: process.env.DEBUG == '1' || process.env.PWDEBUG == '1', // runs non-headless and opens https://playwright.dev/docs/inspector + debug_network: process.env.DEBUG_NETWORK == '1', // log network requests and responses record: process.env.RECORD == '1', // `recordHar` (network) + `recordVideo` time: process.env.TIME == '1', // log duration of each step dryrun: process.env.DRYRUN == '1', // don't claim anything diff --git a/epic-games.js b/epic-games.js index 069eee5..880e337 100644 --- a/epic-games.js +++ b/epic-games.js @@ -53,7 +53,7 @@ const page = context.pages().length ? context.pages()[0] : await context.newPage // console.debug('userAgent:', await page.evaluate(() => navigator.userAgent)); // eslint-disable-next-line no-undef if (cfg.debug) console.debug(await page.evaluate(() => window.screen)); -if (cfg.record && cfg.debug) { +if (cfg.debug_network) { // const filter = _ => true; const filter = r => r.url().includes('store.epicgames.com'); page.on('request', request => filter(request) && console.log('>>', request.method(), request.url()));