Documentation ¶
Overview ¶
Library that uses Readability-like heuristics to extract text from an HTML document
Index ¶
- Constants
- func DecodedBody(resp *http.Response) (content []byte, encoding string, err error)
- func Extract(node *html.Node, flags Flags) (title, text string, err error)
- func ExtractEx(node *html.Node, flags Flags) (title, text string, simplified, flattened, cleaned *element, err error)
- func FetchURL(url string) (body []byte, status int, encoding string, err error)
- type Flags
Constants ¶
View Source
const ( KeepMenus = Flags(1 << iota) // Not implemented KeepLinks // Keeps link destinations for links embedded inside text blocks KeepImages // Not implemented MarkTitles // Not implemented )
Variables ¶
This section is empty.
Functions ¶
func DecodedBody ¶
Returns the body of resp as a decoded string, detecting its encoding
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.