From ce5bac6a03ca9a0c768bc28e2fbb6665ea0a06ee Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Mon, 26 May 2025 01:01:15 +0200 Subject: [PATCH] eg: ignore SHOW=0 since it leads to captcha --- epic-games.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epic-games.js b/epic-games.js index c182e7b..a69a3e3 100644 --- a/epic-games.js +++ b/epic-games.js @@ -3,7 +3,7 @@ import { chromium } from 'patchright'; import { authenticator } from 'otplib'; import chalk from 'chalk'; import path from 'path'; -import { existsSync, writeFileSync, appendFileSync } from 'fs'; +import { existsSync, writeFileSync } from 'fs'; import { resolve, jsonDb, datetime, filenamify, prompt, confirm, notify, html_game_list, handleSIGINT } from './src/util.js'; import { cfg } from './src/config.js'; @@ -21,7 +21,7 @@ if (cfg.time) console.time('startup'); // https://playwright.dev/docs/auth#multi-factor-authentication const context = await chromium.launchPersistentContext(cfg.dir.browser, { // channel: 'chrome', // recommended, but `npx patchright install chrome` clashes with system Chrome - https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs#best-practice----use-chrome-without-fingerprint-injection - headless: cfg.headless, + headless: false, // don't use cfg.headless headless here since SHOW=0 will lead to captcha viewport: { width: cfg.width, height: cfg.height }, // locale: 'en-US', // ignore OS locale to be sure to have english text for locators recordVideo: cfg.record ? { dir: 'data/record/', size: { width: cfg.width, height: cfg.height } } : undefined, // will record a .webm video for each page navigated; without size, video would be scaled down to fit 800x800