Skip to main content

🖥️ CamoufoxDf - Webscraping with Camoufox, Pandas and Cython

pip install pandascamoufox

Important: Cython and a C++ compiler must be installed! The module will be compiled the first time you import it!

This project provides:

  • CamoufoxDf wrapper: Extract DOM elements from a Camoufox browser session into a Pandas DataFrame, including both element attributes and bound methods for direct interaction (e.g., click, hover, type).

✨ Features

  • Use CamoufoxDf to fetch DOM elements into a DataFrame with:
    • All element attributes (id, classes, styles, geometry, dataset, etc.)
    • Pre-bound executable methods (click, hover, type, screenshot, etc.)

⚠️ Important Notes

  • ❌ Does not work inside IPython or Jupyter Notebook This is due to async conflicts between IPython and Camoufox (Playwright). Attempting to run inside IPython will result in event-loop errors.

  • ✅ Recommended Environment To use this effectively, run it inside:

    • VTM Terminal — for advanced terminal rendering (no line breaks)
    • ptpython — for an enhanced interactive REPL

🚀 Usage

from pandascamoufox import CamoufoxDf
from camoufox.utils import DefaultAddons
import pandas as pd
from contextlib import suppress as contextlib_suppress
from time import sleep

cfox = CamoufoxDf(
    humanize=False, headless=False, **{"exclude_addons": [DefaultAddons.UBO]}
)

def gf(selector="*"):
    while True:
        with contextlib_suppress(Exception):
            df = cfox.get_df(selector)
            if "aa_text" in df.columns:
                return df

cfox.page.goto("https://bet365.com")
df=gf()
print(df)

Metadata

Release files for pandascamoufox 0.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pandascamoufox 0.13
File Size Uploaded Provenance Actions
pandascamoufox-0.13.tar.gz 27.6 kB Without provenance Details for pandascamoufox-0.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pandascamoufox 0.13
File Interpreter ABI Platform Actions
pandascamoufox-0.13-py3-none-any.whl Python 3 none any Details for pandascamoufox-0.13-py3-none-any.whl

Total release size: 56.4 kB

Release files / pandascamoufox-0.13.tar.gz

Download URL pandascamoufox-0.13.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c3216c1f17586117bd32938a417d0354a636ba9c9a2d633bbd04db546a66d2d0
BLAKE2b-256 checksum
How to use checksums
548f84c6e37c5387eb8a70bd786809f6e12584ab1d40450bebb271e71598bdf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.9

Release files / pandascamoufox-0.13-py3-none-any.whl

Download URL pandascamoufox-0.13-py3-none-any.whl
Size 28.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
412f9d2d29eac38f3f6448d8b12014644e25821c843f0849ac2418eeff6513cd
BLAKE2b-256 checksum
How to use checksums
3d84b6140ca38ca76a7c3d60081f48db891bd80712fa3365d726e1eaefbdd584
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.9

Security for pandascamoufox 0.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page