Skip to main content

Extract class/id and DOM paths with screenshot for AI agents

Project description

DOM Inspector AI

This package extracts all id and class attributes from a web page, along with their DOM paths and a base64 screenshot.

Installation

pip install git+https://github.com/your-username/dom-inspector-ai.git

CLI Usage

python cli.py https://example.com > output.json

Python Usage

from dom_inspector_ai.analyzer import analyze_url

result = analyze_url("https://example.com")
print(result["ids"])

Output

  • ids: Dictionary of id attributes with tag, hierarchy, and CSS selector path
  • classes: Dictionary of class attributes with count and example paths
  • screenshot_base64: PNG screenshot of the page in base64

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

dom_inspector_ai-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dom_inspector_ai-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file dom_inspector_ai-0.1.0.tar.gz.

File metadata

  • Download URL: dom_inspector_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for dom_inspector_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2ed91f5aca425fa234ef1e36cd7a489e0af3b2dad8460b01a0b436d7da96e97c
MD5 3538adda36f3a3f8c4ae468547299163
BLAKE2b-256 5ad9c46f1c5299f7dea511fe0add75aa7a2c2f9867954855f49799f61ce125ad

See more details on using hashes here.

File details

Details for the file dom_inspector_ai-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dom_inspector_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 788afb90065eb9ea17fe4819ffd852e26059ad657e3f6501954746edbfb39970
MD5 90fabb1b9ca8b6dcecf98a8807c11226
BLAKE2b-256 bd64333b3db4530c6d364c45d8242970e19dcd2b177d20a109e340b8103c4063

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page