Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultMethod is "GET" DefaultMethod = "GET" // DefaultTimeout is 30s DefaultTimeout = 30 * time.Second )
Functions ¶
func FileDownload ¶
FileDownload can save a file to dist
Types ¶
type Context ¶
type Context struct { Crawler *Crawler Request *http.Request Response *http.Response Document *goquery.Document Param map[string]interface{} // contains filtered or unexported fields }
Context is a context for request and response
type Crawler ¶
Crawler is just a crawler
func (*Crawler) AddDataToStorer ¶
AddDataToStorer add a data to storer
type Option ¶
type Option struct { Name string LogDisable bool AutoStopDisable bool PauseTime []int DefaultMethod string StorerWork func(map[string][]interface{}) map[string]bool // contains filtered or unexported fields }
Option is an option of Crawler
Click to show internal directories.
Click to hide internal directories.