Documentation
¶
Index ¶
- Variables
- func Attr(n *html.Node, attrName string) string
- func Content(r io.Reader, is_optimizatioin bool) string
- func ContentFromNode(doc *html.Node, is_optimizatioin bool) string
- func Html(node *html.Node) string
- func SetAttr(n *html.Node, attrName, val string)
- func Tranverse(n *html.Node, f func(*html.Node))
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SCORE_TAG = "maodou" COMPUTE_FUNC = []func(*html.Node){score_f, res_f} INCLUDE_ID_CLASS = []string{"content"} //className或id包含content…加分 EXCLUDE_ID_CLASS = []string{"header", "foot", "sidebar", "about", "logo"} // className或id为header|foot|sidebar…减分 SET_PUNCTUATION = []string{",", ".", ",", "。"} )
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.