From d1aad10fac382831e95e0f89af27a3ef30e85b9d Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Sat, 12 Feb 2022 19:54:09 +0100 Subject: [PATCH] fix locale to en-US epic-games otherwise uses OS locale for text: https://github.com/vogler/free-games-claimer/pull/7 --- epic-games.js | 1 + prime-gaming.js | 1 + 2 files changed, 2 insertions(+) diff --git a/epic-games.js b/epic-games.js index 943741a..a1d4401 100644 --- a/epic-games.js +++ b/epic-games.js @@ -15,6 +15,7 @@ const TIMEOUT = 20 * 1000; // 20s, default is 30s headless: false, viewport: { width: 1280, height: 1280 }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36', // see replace of Headless in util.newStealthContext. TODO update if browser is updated! + locale: "en-US", // ignore OS locale to be sure to have english text for locators args: [ // don't want to see bubble 'Restore pages? Chrome didn't shut down correctly.', but flags below don't work. '--disable-session-crashed-bubble', '--restore-last-session', diff --git a/prime-gaming.js b/prime-gaming.js index f24829c..cda6e66 100644 --- a/prime-gaming.js +++ b/prime-gaming.js @@ -15,6 +15,7 @@ const TIMEOUT = 20 * 1000; // 20s, default is 30s headless: false, viewport: { width: 1280, height: 1280 }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36', // see replace of Headless in newStealthContext above. TODO update if browser is updated! + locale: "en-US", // ignore OS locale to be sure to have english text for locators }); // stealth with playwright: https://github.com/berstend/puppeteer-extra/issues/454#issuecomment-917437212