Camoufox
Camoufox is a Python wrapper around Playwright designed to launch a stealth, anti-fingerprinting browser. It's built for web scraping and automation, providing advanced features to bypass detection. Currently at version 0.4.11, the project is in active and rapid development, with frequent beta releases for both the Python library and the underlying browser builds.
Warnings
- gotcha Camoufox is explicitly stated to be in active development and may not be suitable for a production environment. Users should anticipate frequent changes, potential bugs, and a lack of long-term stability guarantees.
- breaking A critical leak fix was implemented, requiring users to update the Python library. Older versions (specifically pre-0.4.4) may suffer from unpatched leaks that could compromise privacy or stealth capabilities.
- gotcha Underlying Camoufox browser builds (e.g., v146-hardware, FF146-BETA) are often released with warnings about being untested, unstable, or having known issues on specific platforms (e.g., Linux failing to launch pages, MacOS with known bugs).
- gotcha Earlier beta browser builds (e.g., v135.0-beta.21) had a bug that broke Playwright's routing API functionality. While fixed in subsequent browser builds, users on older `camoufox` Python library versions that pull these specific problematic browser builds might encounter issues.
Install
-
pip install camoufox
Imports
- launch
from camoufox import launch
Quickstart
import asyncio
from camoufox import launch
async def main():
# headless=False launches a visible browser; set to True for background operation
browser = await launch(headless=False)
page = await browser.new_page()
await page.goto("https://www.example.com")
print(f"Page title: {await page.title()}")
await page.screenshot(path="example.png")
await browser.close()
if __name__ == '__main__':
asyncio.run(main())