#
BrowserForge Integration
Camoufox is compatible with BrowserForge fingerprints.
By default, Camoufox will generate an use a random BrowserForge fingerprint based on the target os
& screen
constraints.
from camoufox.sync_api import Camoufox
from browserforge.fingerprints import Screen
with Camoufox(
os=('windows', 'macos', 'linux'),
screen=Screen(max_width=1920, max_height=1080),
) as browser:
page = browser.new_page()
page.goto("https://example.com/")
If Camoufox is being ran in headful mode, the max screen size will be generated based on your monitor's dimensions unless otherwise specified.
Note
To prevent UA mismatch detection, Camoufox only generates fingerprints with the same browser version as the current Camoufox version by default. If rotating the Firefox version is absolutely necessary, it would be more advisable to rotate between older versions of Camoufox instead.
Injecting custom Fingerprint objects...
Warning
It is recommended to pass os
& screen
constraints into Camoufox instead. Camoufox will handle fingerprint generation for you. This will be deprecated in the future.
You can also inject your own Firefox BrowserForge fingerprint into Camoufox.
from camoufox.sync_api import Camoufox
from browserforge.fingerprints import FingerprintGenerator
fg = FingerprintGenerator(browser='firefox')
# Launch Camoufox with a random Firefox fingerprint
with Camoufox(fingerprint=fg.generate()) as browser:
page = browser.new_page()
page.goto("https://example.com/")
Note: As of now, some properties from BrowserForge fingerprints will not be passed to Camoufox. This is due to the outdated fingerprint dataset from Apify's fingerprint-suite (see here). Properties will be re-enabled as soon as an updated dataset is available.