A simple HTML to Tree Diagram library that outputs HTML DOM as image for visualization.
Project description
html-dom-visualize
A simple HTML to Tree Diagram library that outputs HTML DOM as image for visualization. Supports custom elements filtering and masking.
Useful when analyzing elements composition of HTML documents or developing tools that manipulates HTML DOM structures.
Install
pip install html-dom-visualize
Using in Command line
options:
-h, --help show this help message and exit
-f FILE, --file FILE Path to local HTML file to analyze
-u URL, --url URL URL of the HTML page to analyze
-b BRANCH, --branch BRANCH
Element tags that if included, their
ancestors and all their descendants
would be preserved. Multiple tags can
be specified If not specified, all
elements will be preserved.
-m MASK, --mask MASK Element tags that if included, they
will be masked from the output graph
such that their children will be
removed, and only the inner texts will
be preserved. Multiple tags can be
specified. If not specified, no tags
will be masked.
example:
# only include branches that contains <button> / <input>
# mask out children inside <button> and <a>
html-dom-visualize -f ./webpage.html -b button -b input -m a -m b
# load from URL
html-dom-visualize -u https://google.com
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for html_dom_visualize-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcef889ff1c87f23aa093f83d020cfb6b6d65b31ce647a86edd03601e272d144 |
|
MD5 | f0aac83089c2e28c08a8df8013e91eff |
|
BLAKE2b-256 | cd70f7affdb4b09a73f5d932e8868ff69e7e4a78bf22081eea8bc0bba2864592 |