Skip to content

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

License

Notifications You must be signed in to change notification settings

rykkard/htmlquery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Languages