Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camoufox integration PoC #2836

Open
B4nan opened this issue Feb 10, 2025 · 3 comments
Open

Camoufox integration PoC #2836

B4nan opened this issue Feb 10, 2025 · 3 comments
Assignees
Labels
feature Issues that represent new features or improvements to existing features. t-tooling Issues with this label are in the ownership of the tooling team.

Comments

@B4nan
Copy link
Member

B4nan commented Feb 10, 2025

Create a PoC of crawlee project using camoufox. Can be a template initially, before we agree on the next steps.

It should be able to run the python script to generate browser launch options and feed that to the camoufox as part of our code.

In the long run, we can consider having CamoufoxCrawler or a camoufox template with a guide.

@B4nan B4nan added the feature Issues that represent new features or improvements to existing features. label Feb 10, 2025
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Feb 10, 2025
@janbuchar
Copy link
Contributor

Are you suggesting running Camoufox from JS? It's just a hunch, but that might be tricky.

@B4nan
Copy link
Member Author

B4nan commented Feb 10, 2025

Yes, we already discussed how to approach this today with @barjin and @Pijukatel, it should be actually quite simple. But we'll need to depend on running one python script under the hood for now to generate the launch options.

@Pijukatel
Copy link

Pijukatel commented Feb 11, 2025

Summary of the discussion and some links:

Regarding the plan for gradual implementation, it can have following steps:

  • First version of POC can be fully with JS
  • Next version draft can generate options for Camoufox dynamically by calling the Python function launch_options and dumping result to json file. Input arguments for such function must be properly populated or rely on default. To generate custom fingerprint input argument you can use FingerprintGenerator.generate
  • Next version can rewrite argument preparation utility functions from Python to Javascript and use our Javascript implementation of FingerprintGenerator.

Here is reference of how Camoufox is started through Playwright in Python: https://github.com/daijro/camoufox/blob/main/pythonlib/camoufox/async_api.py#L95
Here is another JS implementation example showing how to use Camoufox in JS: https://github.com/DemonMartin/node-camoufox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issues that represent new features or improvements to existing features. t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

No branches or pull requests

4 participants