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/yut0takagi/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.1.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.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dom_inspector_ai-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 16ab22f343a038da965b3fc2683cb220c2b903a1012adfd632716b9c8b95dea2
MD5 1493d9edca828db0cfb7a747a355a4e9
BLAKE2b-256 262d427b98472d570a496f5522247f75b774528f3a849109b54efe60a787d39d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dom_inspector_ai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3939e08e1ee0f2fa8bc0a77c69f1cef7dbf74012f33a2c035a78f3dcba9e18d0
MD5 e27ea227206e208b3f814d1a61ca7608
BLAKE2b-256 f26b4f0ce867554e611bd949f7ce99c4c57b0df37b30658cdc2ecbe146d85b02

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