Documentation ¶
Index ¶
- Variables
- func DissectNodes(input *html.Node, toks ...Tok)
- func FindDeepText(n *html.Node) (data string)
- func FindNodes(input *html.Node, match Matcher, callback MatcherCallback)
- func FindText(input *html.Node) (data string)
- func IsTextHTML(contentType string) bool
- func MatchA(t html.NodeType, a atom.Atom) bool
- func MatchAbbr(t html.NodeType, a atom.Atom) bool
- func MatchAddress(t html.NodeType, a atom.Atom) bool
- func MatchArea(t html.NodeType, a atom.Atom) bool
- func MatchArticle(t html.NodeType, a atom.Atom) bool
- func MatchAside(t html.NodeType, a atom.Atom) bool
- func MatchAudio(t html.NodeType, a atom.Atom) bool
- func MatchB(t html.NodeType, a atom.Atom) bool
- func MatchBase(t html.NodeType, a atom.Atom) bool
- func MatchBdi(t html.NodeType, a atom.Atom) bool
- func MatchBdo(t html.NodeType, a atom.Atom) bool
- func MatchBlockquote(t html.NodeType, a atom.Atom) bool
- func MatchBody(t html.NodeType, a atom.Atom) bool
- func MatchBr(t html.NodeType, a atom.Atom) bool
- func MatchButton(t html.NodeType, a atom.Atom) bool
- func MatchCanvas(t html.NodeType, a atom.Atom) bool
- func MatchCaption(t html.NodeType, a atom.Atom) bool
- func MatchCite(t html.NodeType, a atom.Atom) bool
- func MatchCode(t html.NodeType, a atom.Atom) bool
- func MatchCol(t html.NodeType, a atom.Atom) bool
- func MatchColgroup(t html.NodeType, a atom.Atom) bool
- func MatchCommand(t html.NodeType, a atom.Atom) bool
- func MatchData(t html.NodeType, a atom.Atom) bool
- func MatchDatalist(t html.NodeType, a atom.Atom) bool
- func MatchDd(t html.NodeType, a atom.Atom) bool
- func MatchDel(t html.NodeType, a atom.Atom) bool
- func MatchDetails(t html.NodeType, a atom.Atom) bool
- func MatchDfn(t html.NodeType, a atom.Atom) bool
- func MatchDialog(t html.NodeType, a atom.Atom) bool
- func MatchDiv(t html.NodeType, a atom.Atom) bool
- func MatchDl(t html.NodeType, a atom.Atom) bool
- func MatchDt(t html.NodeType, a atom.Atom) bool
- func MatchEm(t html.NodeType, a atom.Atom) bool
- func MatchEmbed(t html.NodeType, a atom.Atom) bool
- func MatchFieldset(t html.NodeType, a atom.Atom) bool
- func MatchFigcaption(t html.NodeType, a atom.Atom) bool
- func MatchFigure(t html.NodeType, a atom.Atom) bool
- func MatchFooter(t html.NodeType, a atom.Atom) bool
- func MatchForm(t html.NodeType, a atom.Atom) bool
- func MatchH1(t html.NodeType, a atom.Atom) bool
- func MatchH2(t html.NodeType, a atom.Atom) bool
- func MatchH3(t html.NodeType, a atom.Atom) bool
- func MatchH4(t html.NodeType, a atom.Atom) bool
- func MatchH5(t html.NodeType, a atom.Atom) bool
- func MatchH6(t html.NodeType, a atom.Atom) bool
- func MatchHead(t html.NodeType, a atom.Atom) bool
- func MatchHeader(t html.NodeType, a atom.Atom) bool
- func MatchHgroup(t html.NodeType, a atom.Atom) bool
- func MatchHr(t html.NodeType, a atom.Atom) bool
- func MatchHtml(t html.NodeType, a atom.Atom) bool
- func MatchI(t html.NodeType, a atom.Atom) bool
- func MatchIframe(t html.NodeType, a atom.Atom) bool
- func MatchImg(t html.NodeType, a atom.Atom) bool
- func MatchInput(t html.NodeType, a atom.Atom) bool
- func MatchIns(t html.NodeType, a atom.Atom) bool
- func MatchKbd(t html.NodeType, a atom.Atom) bool
- func MatchKeygen(t html.NodeType, a atom.Atom) bool
- func MatchLabel(t html.NodeType, a atom.Atom) bool
- func MatchLegend(t html.NodeType, a atom.Atom) bool
- func MatchLi(t html.NodeType, a atom.Atom) bool
- func MatchLink(t html.NodeType, a atom.Atom) bool
- func MatchMap(t html.NodeType, a atom.Atom) bool
- func MatchMark(t html.NodeType, a atom.Atom) bool
- func MatchMenu(t html.NodeType, a atom.Atom) bool
- func MatchMenuitem(t html.NodeType, a atom.Atom) bool
- func MatchMeta(t html.NodeType, a atom.Atom) bool
- func MatchMeter(t html.NodeType, a atom.Atom) bool
- func MatchNav(t html.NodeType, a atom.Atom) bool
- func MatchNoscript(t html.NodeType, a atom.Atom) bool
- func MatchObject(t html.NodeType, a atom.Atom) bool
- func MatchOl(t html.NodeType, a atom.Atom) bool
- func MatchOptgroup(t html.NodeType, a atom.Atom) bool
- func MatchOption(t html.NodeType, a atom.Atom) bool
- func MatchOutput(t html.NodeType, a atom.Atom) bool
- func MatchP(t html.NodeType, a atom.Atom) bool
- func MatchParam(t html.NodeType, a atom.Atom) bool
- func MatchPre(t html.NodeType, a atom.Atom) bool
- func MatchProgress(t html.NodeType, a atom.Atom) bool
- func MatchQ(t html.NodeType, a atom.Atom) bool
- func MatchRp(t html.NodeType, a atom.Atom) bool
- func MatchRt(t html.NodeType, a atom.Atom) bool
- func MatchRuby(t html.NodeType, a atom.Atom) bool
- func MatchS(t html.NodeType, a atom.Atom) bool
- func MatchSamp(t html.NodeType, a atom.Atom) bool
- func MatchScript(t html.NodeType, a atom.Atom) bool
- func MatchSection(t html.NodeType, a atom.Atom) bool
- func MatchSelect(t html.NodeType, a atom.Atom) bool
- func MatchSmall(t html.NodeType, a atom.Atom) bool
- func MatchSource(t html.NodeType, a atom.Atom) bool
- func MatchSpan(t html.NodeType, a atom.Atom) bool
- func MatchStrong(t html.NodeType, a atom.Atom) bool
- func MatchStyle(t html.NodeType, a atom.Atom) bool
- func MatchSub(t html.NodeType, a atom.Atom) bool
- func MatchSummary(t html.NodeType, a atom.Atom) bool
- func MatchSup(t html.NodeType, a atom.Atom) bool
- func MatchTable(t html.NodeType, a atom.Atom) bool
- func MatchTbody(t html.NodeType, a atom.Atom) bool
- func MatchTd(t html.NodeType, a atom.Atom) bool
- func MatchTemplate(t html.NodeType, a atom.Atom) bool
- func MatchTextarea(t html.NodeType, a atom.Atom) bool
- func MatchTfoot(t html.NodeType, a atom.Atom) bool
- func MatchTh(t html.NodeType, a atom.Atom) bool
- func MatchThead(t html.NodeType, a atom.Atom) bool
- func MatchTime(t html.NodeType, a atom.Atom) bool
- func MatchTitle(t html.NodeType, a atom.Atom) bool
- func MatchTr(t html.NodeType, a atom.Atom) bool
- func MatchTrack(t html.NodeType, a atom.Atom) bool
- func MatchU(t html.NodeType, a atom.Atom) bool
- func MatchUl(t html.NodeType, a atom.Atom) bool
- func MatchVar(t html.NodeType, a atom.Atom) bool
- func MatchVideo(t html.NodeType, a atom.Atom) bool
- func MatchWbr(t html.NodeType, a atom.Atom) bool
- func ParseReader(input io.Reader, toks ...Tok) error
- func ParseResponse(response *http.Response, toks ...Tok) error
- func ParseResponseWithDefer(response *http.Response, toks ...Tok) error
- func PrettyPrint(n *html.Node) string
- func PrintNode(n *html.Node)
- func PrintNodes(n *html.Node)
- type Matcher
- type MatcherCallback
- type Tok
- type Toks
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrResponseBodyIsEmpty = errors.New("http.Response Body is empty") ErrResponseBodyIsNotHTML = errors.New("http.Response Body is not HTML type or malformed") )
-
Functions ¶
func DissectNodes ¶
DissectNodes - range toks through recursively through FindNodes
func FindDeepText ¶
FindDeepText - finds text in given & child nodes
func FindNodes ¶
func FindNodes(input *html.Node, match Matcher, callback MatcherCallback)
FindNodes - recursively find nodes
func ParseReader ¶
ParseReader - parses io.Reader, expected input is HTML page
func ParseResponse ¶
ParseResponse - wrapps sequence of URL fate functions user is response to handle: defer response.Body.Close()
func ParseResponseWithDefer ¶
ParseResponseWithDefer - same as ParseResponse but with defer response.Body.Close()
func PrintNodes ¶
PrintNodes - convenient to use as Tok.Callback to see html.Node siblings & parents
Types ¶
type MatcherCallback ¶
MatcherCallback - uses in Tok as a callback when match occurs. Contents of the (t *html.Token) may change on the next call to Next.
type Tok ¶
type Tok struct { Match Matcher Callback MatcherCallback }
Tok - contains html.Node Matcher & Callback
Directories ¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/github.com/PuerkitoBio/goquery
Package goquery implements features similar to jQuery, including the chainable syntax, to manipulate and query an HTML document.
|
Package goquery implements features similar to jQuery, including the chainable syntax, to manipulate and query an HTML document. |
_workspace/src/github.com/andybalholm/cascadia
The cascadia package is an implementation of CSS selectors.
|
The cascadia package is an implementation of CSS selectors. |
_workspace/src/golang.org/x/net/html
Package html implements an HTML5-compliant tokenizer and parser.
|
Package html implements an HTML5-compliant tokenizer and parser. |
_workspace/src/golang.org/x/net/html/atom
Package atom provides integer codes (also known as atoms) for a fixed set of frequently occurring HTML strings: tag names and attribute keys such as "p" and "id".
|
Package atom provides integer codes (also known as atoms) for a fixed set of frequently occurring HTML strings: tag names and attribute keys such as "p" and "id". |
_workspace/src/golang.org/x/net/html/charset
Package charset provides common text encodings for HTML documents.
|
Package charset provides common text encodings for HTML documents. |
_workspace/src/golang.org/x/text/encoding
Package encoding defines an interface for character encodings, such as Shift JIS and Windows 1252, that can convert to and from UTF-8.
|
Package encoding defines an interface for character encodings, such as Shift JIS and Windows 1252, that can convert to and from UTF-8. |
_workspace/src/golang.org/x/text/encoding/charmap
Package charmap provides simple character encodings such as IBM Code Page 437 and Windows 1252.
|
Package charmap provides simple character encodings such as IBM Code Page 437 and Windows 1252. |
_workspace/src/golang.org/x/text/encoding/htmlindex
Package htmlindex maps character set encoding names to Encodings as recommended by the W3C for use in HTML 5.
|
Package htmlindex maps character set encoding names to Encodings as recommended by the W3C for use in HTML 5. |
_workspace/src/golang.org/x/text/encoding/ianaindex
Package ianaindex maps names to Encodings as specified by the IANA registry.
|
Package ianaindex maps names to Encodings as specified by the IANA registry. |
_workspace/src/golang.org/x/text/encoding/internal
Package internal contains code that is shared among encoding implementations.
|
Package internal contains code that is shared among encoding implementations. |
_workspace/src/golang.org/x/text/encoding/internal/identifier
Package identifier defines the contract between implementations of Encoding and Index by defining identifiers that uniquely identify standardized coded character sets (CCS) and character encoding schemes (CES), which we will together refer to as encodings, for which Encoding implementations provide converters to and from UTF-8.
|
Package identifier defines the contract between implementations of Encoding and Index by defining identifiers that uniquely identify standardized coded character sets (CCS) and character encoding schemes (CES), which we will together refer to as encodings, for which Encoding implementations provide converters to and from UTF-8. |
_workspace/src/golang.org/x/text/encoding/japanese
Package japanese provides Japanese encodings such as EUC-JP and Shift JIS.
|
Package japanese provides Japanese encodings such as EUC-JP and Shift JIS. |
_workspace/src/golang.org/x/text/encoding/korean
Package korean provides Korean encodings such as EUC-KR.
|
Package korean provides Korean encodings such as EUC-KR. |
_workspace/src/golang.org/x/text/encoding/simplifiedchinese
Package simplifiedchinese provides Simplified Chinese encodings such as GBK.
|
Package simplifiedchinese provides Simplified Chinese encodings such as GBK. |
_workspace/src/golang.org/x/text/encoding/traditionalchinese
Package traditionalchinese provides Traditional Chinese encodings such as Big5.
|
Package traditionalchinese provides Traditional Chinese encodings such as Big5. |
_workspace/src/golang.org/x/text/encoding/unicode
Package unicode provides Unicode encodings such as UTF-16.
|
Package unicode provides Unicode encodings such as UTF-16. |
_workspace/src/golang.org/x/text/transform
Package transform provides reader and writer wrappers that transform the bytes passing through as well as various transformations.
|
Package transform provides reader and writer wrappers that transform the bytes passing through as well as various transformations. |
Click to show internal directories.
Click to hide internal directories.