-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.txt
20 lines (18 loc) · 887 Bytes
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
gethtmlX is a simple html querier that get information from html.
Usage: gethtmlx <operations> [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