Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FileTest = &Spider{ Name: "文件下载测试", Description: "文件下载测试", EnableCookie: false, RuleTree: &RuleTree{ Root: func(ctx *Context) { ctx.AddQueue(&request.Request{ Url: "https://www.baidu.com/img/bd_logo1.png", Rule: "百度图片", ConnTimeout: -1, DownloaderID: 0, }) ctx.AddQueue(&request.Request{ Url: "https://pholcus", Rule: "Pholcus页面", ConnTimeout: -1, DownloaderID: 0, }) }, Trunk: map[string]*Rule{ "百度图片": { ParseFunc: func(ctx *Context) { ctx.FileOutput("baidu") }, }, "Pholcus页面": { ParseFunc: func(ctx *Context) { ctx.FileOutput() }, }, }, }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.