Open bestplay9384 opened 1 week ago
Hello,
Camoufox uses Playwright's Juggler protocol to control the browser, which is implemented separately from Firefox's native RDP API. Since Firefox's remote debug server is detectable (see #90), I don't have plans to support Puppeteer any time soon.
If you're looking to use Camoufox in NodeJS, you could launch a remote server using the Python library (see here), then connect to it from NodeJS Playwright:
import playwright from "playwright-core";
// Connect to the Python server
const pwEndpoint = `ws://localhost:36539/bf81a6ed494f6ecf3698ca7570506203`;
const browser = await playwright.firefox.connect(pwEndpoint);
const context = await browser.newContext();
const page = await context.newPage();
Hope this helps :+1:
Hi,
I've looked through code & commits in repo, very good work! :) However no matter i try i cannot start the browser correctly.
What am i trying to accomplish? I've built a docker container based on AmazonLinux2023 (fedora), installed every package that was missing and needed by camoufox (docs). Now i'm trying to start camoufox-bin, but via code. All my code is in NodeJS that is why i cannot use Camoufox python library (and this is a must have unfortunately because all my scraping scripts (300+) are based on puppeteer-core interfaces - NodeJS).
What i tried? I've thought there is a chance to start camoufox like that:
--remote-debugging-port 9223 -headless
)child_process.exec
but effect is the same.ProtocolError: browsingContext.create timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed. -> at BidiBrowserContext.newPage (in puppeteer context)
Am i missing something? I've noticed there is no firefox profile in my args, but still it should start up with some defaults imho, am i right?
Last question, are You planning maybe to release binary itself as a standalone firefox "fork" so playwright nor python are necessary?
Amazing work, thanks for help :)