rykkard / htmlquery

A fairly simple wrapper to extract html elements built on Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTMLquery

GitHub go.mod Go version License contributions welcome

Install

  • Installation
$ go get -v 'github.com/rykkard/htmlquery'
  • Update
$ go get -v -u 'github.com/rykkard/htmlquery'

Usage

$ 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

Examples

  • 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>

About

A fairly simple wrapper to extract html elements built on Go.

License:MIT License


Languages

Language:Go 100.0%