fix: add missing dockerfile deps
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { chromium } from "npm:playwright-extra";
|
||||
import { firefox } from "npm:playwright-extra";
|
||||
import { createStreamResponse } from "@lib/helpers.ts";
|
||||
import StealthPlugin from "npm:puppeteer-extra-plugin-stealth";
|
||||
|
||||
@ -9,7 +9,7 @@ const userAgentStrings = [
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36",
|
||||
];
|
||||
|
||||
chromium.use(StealthPlugin());
|
||||
firefox.use(StealthPlugin());
|
||||
|
||||
export async function fetchHtmlWithPlaywright(
|
||||
fetchUrl: string,
|
||||
@ -17,7 +17,7 @@ export async function fetchHtmlWithPlaywright(
|
||||
): Promise<string> {
|
||||
streamResponse.enqueue("booting up playwright");
|
||||
// Launch the Playwright browser
|
||||
const browser = await chromium.launch();
|
||||
const browser = await firefox.launch();
|
||||
|
||||
streamResponse.enqueue("fetching html");
|
||||
|
||||
|
Reference in New Issue
Block a user