- Installation
$ go get -v 'github.com/rykkard/htmlquery'
- Update
$ go get -v -u 'github.com/rykkard/htmlquery'
$ hq -h
HTMLquery
A fairly simple html selector built around the goquery golang package.
Usage:
hq [OPTIONS] <query> [<resources>]
Options:
-u, --url enable URL mode
-r, --raw-output enable raw output
-h, --help show help
- Querying file resource with stdin
$ curl -s http://example.com |hq h1
<h1>Example Domain</h1>
- Querying url resources
$ hq -u h1 http://example.com
<h1>Example Domain</h1>
- Querying url resources with stdin
$ echo http://example.com |hq -u h1
<h1>Example Domain</h1>