Documentation ¶
Index ¶
- Variables
- func Execute(ana *HtmlAnalyzor, actions ...Action) error
- type Action
- type ActionFunc
- type AddAlertAction
- type AppendCssAction
- type GetResourceAction
- type HtmlAnalyzor
- type IFilter
- type MakeVisibleAction
- type RemoveBaseLabelAction
- type RemoveRedirectAction
- type RemoveScriptAction
- type SetUTF8Action
Constants ¶
This section is empty.
Variables ¶
View Source
var ERR_Break error = errors.New("break other nodes")
View Source
var ERR_IgnoreNode error = errors.New("ignored a node")
Functions ¶
Types ¶
type ActionFunc ¶
type ActionFunc func(*html.Node, *HtmlAnalyzor) error
实现Action接口
func (ActionFunc) Do ¶
func (f ActionFunc) Do(node *html.Node, ana *HtmlAnalyzor) error
type AddAlertAction ¶
type AddAlertAction Action
识别篡改的适配器
func AddAlert ¶
func AddAlert() AddAlertAction
type AppendCssAction ¶
type AppendCssAction Action
func AppendCss ¶
func AppendCss(path string) AppendCssAction
type GetResourceAction ¶
type GetResourceAction Action
添加单文件的适配器
func GetResource ¶
func GetResource() GetResourceAction
type HtmlAnalyzor ¶
type HtmlAnalyzor struct { *model.HtmlResult Filter IFilter AlertList []model.AlertInfo Charset string Newwords [][]byte DocSuccess bool // contains filtered or unexported fields }
func (*HtmlAnalyzor) BuildResouces ¶
func (self *HtmlAnalyzor) BuildResouces(parentUrl *url.URL, curUrl string) (key string)
func (*HtmlAnalyzor) Save ¶
func (self *HtmlAnalyzor) Save() (err error)
type IFilter ¶
type IFilter interface { Push([]byte) Exists([]byte) bool Close() error Write() error IsEmpty() bool }
增量过滤器
type MakeVisibleAction ¶
type MakeVisibleAction Action
func MakeVisible ¶
func MakeVisible() MakeVisibleAction
type RemoveBaseLabelAction ¶
type RemoveBaseLabelAction Action
func RemoveBaseLabel ¶
func RemoveBaseLabel() RemoveBaseLabelAction
type RemoveRedirectAction ¶
type RemoveRedirectAction Action
func RemoveRedirect ¶
func RemoveRedirect() RemoveRedirectAction
type RemoveScriptAction ¶
type RemoveScriptAction Action
type SetUTF8Action ¶
type SetUTF8Action Action
Click to show internal directories.
Click to hide internal directories.