From 612d9cd34b99ceb42759180c6e91657af34fa843 Mon Sep 17 00:00:00 2001 From: Aquabet Date: Thu, 19 Dec 2024 09:38:12 -0800 Subject: [PATCH] trying to fix Vitest puppeteer on Node lts/-1 --- lib/routes/ups/track.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/routes/ups/track.ts b/lib/routes/ups/track.ts index 7547ca1485f6bf..c0bd81c12169e4 100644 --- a/lib/routes/ups/track.ts +++ b/lib/routes/ups/track.ts @@ -1,7 +1,6 @@ import { Route } from '@/types'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -import { config } from '@/config'; import puppeteer from '@/utils/puppeteer'; export const route: Route = { @@ -35,12 +34,6 @@ async function handler(ctx) { const browser = await puppeteer(); const page = await browser.newPage(); - await page.setUserAgent(config.ua); - - await page.setExtraHTTPHeaders({ - 'Accept-Language': 'en-US,en;q=0.9', - }); - await page.setRequestInterception(true); // skip loading images, stylesheets, and fonts