From 5fac6de05abf81aa80a2df520f534dad264ddcb7 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Sun, 19 Jan 2025 20:25:47 +0100 Subject: [PATCH] feat: some stuff --- lib/playwright.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/playwright.ts b/lib/playwright.ts index 9221039..df4dcdc 100644 --- a/lib/playwright.ts +++ b/lib/playwright.ts @@ -25,6 +25,7 @@ export async function fetchHtmlWithPlaywright( username: env.PROXY_USERNAME, password: env.PROXY_PASSWORD, }; + console.log("Using proxy server", config); } // Launch the Playwright browser @@ -34,15 +35,7 @@ export async function fetchHtmlWithPlaywright( try { // Open a new browser context and page - const context = await browser.newContext({ - userAgent: - userAgentStrings[Math.floor(Math.random() * userAgentStrings.length)], - }); - - //add init script - await context.addInitScript( - "Object.defineProperty(navigator, 'webdriver', {get: () => undefined})", - ); + const context = await browser.newContext(); const page = await context.newPage();