Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

webutil

webutil provides Go functions that operate at a level better matching the level that I'm working at when I'm using JSON API's and scraping the web.

Features

  • GET a []byte. 404, etc. are an error.
  • Same, but return an io.ReadCloser.
  • Same, but parse with net/html and return the html.Node. Useful for using Cascadia to extract parts.
  • Get text from an html.Node.
  • Walk an html.Node.

Usage

go get sethwklein.net/go/webutil

import "sethwklein.net/go/webutil"

http://godoc.org/sethwklein.net/go/webutil

Rationale

I know better than to publish this package. Someone has said (I don't have a link handy :( ) that packages with util in the name are almost always a bad idea. And it makes no sense to use a package that pulls in an HTML parser when all you need is a []byte. But I can't seem to stop using it, so I'm publishing it even if it should be a bad idea.

About

Package webutil is for working with the web at a higher level of abstraction than net/http and such.

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.