https://github.com/lifenjoiner/gethtmlx
A simple html querier.
https://github.com/lifenjoiner/gethtmlx
cli html querier
Last synced: 11 months ago
JSON representation
A simple html querier.
- Host: GitHub
- URL: https://github.com/lifenjoiner/gethtmlx
- Owner: lifenjoiner
- License: mit
- Created: 2022-02-14T11:41:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-12T14:25:53.000Z (over 3 years ago)
- Last Synced: 2025-02-12T19:51:31.369Z (over 1 year ago)
- Topics: cli, html, querier
- Language: C
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.txt
- License: LICENSE
Awesome Lists containing this project
README
gethtmlX is a simple html querier that get information from html.
Usage: gethtmlx [html-file]
Encoding caution: UTF8 desired! Or strange things could happen.
operation examples:
getElementById(main).getElementsByClassName(list)[0].getAttribute(href)
getElementById(main).getElementsByClassName(list)[0].textContent
getElementById(main).getElementsByClassName("a b").length
getElementById(main).getElementsByTagName(a)
getElementById(main).children.length
getElementsByTagName(a).each(getAttribute(href))
document
[document.]children
examples:
type test.htm | gethtmlx getElementsByTagName(a)
gethtmlx getElementsByTagName(a) < test.htm
type ss.htm |gethtmlx getElementsByClassName(col-sm-4) |gethtmlx getElementsByTagName(h4).each(textContent)
Tips: You may use this together with iconv.
https://github.com/lifenjoiner/gethtmlX