Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractMeta ¶
ExtractMeta collects <meta> tags into a map.
Keys come from the "name" or "property" attribute. The "content" attribute is used as the value. If both name and property are present, property takes precedence.
func ExtractTitle ¶
ExtractTitle returns the document <title> text, if any.
Types ¶
type Document ¶
Document represents a parsed HTML document.
Root is the root node returned by the underlying HTML parser.
func ParseDocument ¶
ParseDocument parses raw HTML bytes into a Document.
It uses golang.org/x/net/html for robust HTML5 parsing.
type Heading ¶
Heading represents a heading element (h1–h6).
func ExtractHeadings ¶
ExtractHeadings extracts all headings (h1–h6) in document order.
type Link ¶
Link represents a hyperlink in the document.
func ExtractLinks ¶
ExtractLinks returns all <a> elements as Link values.