Web Scraping with Camoufox and Cython+Pandas
Project description
🖥️ Pandas Color Printer & CamoufoxDf
This project provides:
CamoufoxDfwrapper: 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
CamoufoxDfto fetch DOM elements into aDataFramewith:- 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
- ptpython — for an enhanced interactive REPL
🚀 Usage
from pandascamoufox import CamoufoxDf
from camoufox.utils import DefaultAddons
cfox = CamoufoxDf(
humanize=False,
headless=False,
**{"exclude_addons": [DefaultAddons.UBO]}
)
cfox.page.goto("https://bet365.com")
df = cfox.get_df("*")
print(df)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pandascamoufox-0.11.tar.gz.
File metadata
- Download URL: pandascamoufox-0.11.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02be981cbe2e745267d0cca0f0196538716b52d45f2cdbce6342ff80324e533e
|
|
| MD5 |
c80043760fd340bf7c334dcd38a8238a
|
|
| BLAKE2b-256 |
afef6ac252fa93ee3da468ea1e1ac29215ab6ca5cf216af2f6c14baf6d556586
|
File details
Details for the file pandascamoufox-0.11-py3-none-any.whl.
File metadata
- Download URL: pandascamoufox-0.11-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
414258775b49cb87025ebe76eee41f2f9a5cdfe7298cdcecef5b8cda9608042d
|
|
| MD5 |
d2fa01743c7d43ab70f0039ab9237f45
|
|
| BLAKE2b-256 |
32cc7b0291113695295298f9628915de6170801c7abf2ba269ce706b89dc6a85
|