omegafox/pythonlib
2024-11-18 02:32:20 -06:00
..
camoufox pythonlib: Proxy credentials are now optional 2024-11-18 10:57:22 +08:00
publish.sh pythonlib: Fully fix #61 0.3.6 2024-10-31 06:42:47 -05:00
pyproject.toml pythonlib: Bump to 0.3.10 2024-11-18 02:32:20 -06:00
README.md Version range control, multi locale usage, etc 2024-10-19 23:10:51 -05:00

Camoufox Python Interface

Lightweight wrapper around the Playwright API to help launch Camoufox.

Note

All the the latest documentation is avaliable here.


What is this?

This Python library wraps around Playwright's API to help automatically generate & inject unique device characteristics (OS, CPU info, navigator, fonts, headers, screen dimensions, viewport size, WebGL, addons, etc.) into Camoufox.

It uses BrowserForge under the hood to generate fingerprints that mimic the statistical distribution of device characteristics in real-world traffic.

In addition, it will also calculate your target geolocation, timezone, and locale to avoid proxy protection (see demo).


Installation

First, install the camoufox package:

pip install -U camoufox[geoip]

The geoip parameter is optional, but heavily recommended if you are using proxies. It will download an extra dataset to determine the user's longitude, latitude, timezone, country, & locale.

Next, download the Camoufox browser:

Windows

camoufox fetch

MacOS & Linux

python3 -m camoufox fetch

To uninstall, run camoufox remove.

CLI options
Usage: python -m camoufox [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  fetch    Fetch the latest version of Camoufox
  path     Display the path to the Camoufox executable
  remove   Remove all downloaded files
  server   Launch a Playwright server
  test     Open the Playwright inspector
  version  Display the current version

Usage

All of the latest documentation is avaliable at camoufox.com/python.