Versions in this module Expand all Collapse all v1 v1.3.0 Mar 14, 2018 Changes in this version + const A + const FORCED_STOP + const KEYIN + const LIMIT + const T + var Species = &SpiderSpecies + func PutContext(ctx *Context) + type Bell struct + Hour int + Min int + Sec int + type Clock struct + type Context struct + Request *request.Request + Response *http.Response + func GetContext(sp *Spider, req *request.Request) *Context + func (*Context) Log() logs.Logs + func (self *Context) AddQueue(req *request.Request) *Context + func (self *Context) Aid(aid map[string]interface{}, ruleName ...string) interface{} + func (self *Context) CopyRequest() *request.Request + func (self *Context) CopyTemps() request.Temp + func (self *Context) CreatItem(item map[int]interface{}, ruleName ...string) map[string]interface{} + func (self *Context) FileOutput(nameOrExt ...string) + func (self *Context) GetCookie() string + func (self *Context) GetDom() *goquery.Document + func (self *Context) GetError() error + func (self *Context) GetHeader() http.Header + func (self *Context) GetHost() string + func (self *Context) GetItemField(index int, ruleName ...string) (field string) + func (self *Context) GetItemFieldIndex(field string, ruleName ...string) (index int) + func (self *Context) GetItemFields(ruleName ...string) []string + func (self *Context) GetKeyin() string + func (self *Context) GetLimit() int + func (self *Context) GetMethod() string + func (self *Context) GetName() string + func (self *Context) GetReferer() string + func (self *Context) GetRequest() *request.Request + func (self *Context) GetRequestHeader() http.Header + func (self *Context) GetResponse() *http.Response + func (self *Context) GetRule(ruleName string) (*Rule, bool) + func (self *Context) GetRuleName() string + func (self *Context) GetRules() map[string]*Rule + func (self *Context) GetSpider() *Spider + func (self *Context) GetStatusCode() int + func (self *Context) GetTemp(key string, defaultValue interface{}) interface{} + func (self *Context) GetTemps() request.Temp + func (self *Context) GetText() string + func (self *Context) GetUrl() string + func (self *Context) JsAddQueue(jreq map[string]interface{}) *Context + func (self *Context) Output(item interface{}, ruleName ...string) + func (self *Context) Parse(ruleName ...string) *Context + func (self *Context) PullFiles() (fs []data.FileCell) + func (self *Context) PullItems() (ds []data.DataCell) + func (self *Context) ResetText(body string) *Context + func (self *Context) RunTimer(id string) bool + func (self *Context) SetError(err error) + func (self *Context) SetKeyin(keyin string) *Context + func (self *Context) SetLimit(max int) *Context + func (self *Context) SetPausetime(pause int64, runtime ...bool) *Context + func (self *Context) SetReferer(referer string) *Context + func (self *Context) SetResponse(resp *http.Response) *Context + func (self *Context) SetTemp(key string, value interface{}) *Context + func (self *Context) SetTimer(id string, tol time.Duration, bell *Bell) bool + func (self *Context) SetUrl(url string) *Context + func (self *Context) UpsertItemField(field string, ruleName ...string) (index int) + type Rule struct + AidFunc func(*Context, map[string]interface{}) interface{} + ItemFields []string + ParseFunc func(*Context) + type RuleModle struct + AidFunc string + Name string + ParseFunc string + type RuleTree struct + Root func(*Context) + Trunk map[string]*Rule + type Spider struct + Description string + EnableCookie bool + Keyin string + Limit int64 + Name string + Namespace func(self *Spider) string + NotDefaultField bool + Pausetime int64 + RuleTree *RuleTree + SubNamespace func(self *Spider, dataCell map[string]interface{}) string + func (self *Spider) CanStop() bool + func (self *Spider) Copy() *Spider + func (self *Spider) Defer() + func (self *Spider) DoHistory(req *request.Request, ok bool) bool + func (self *Spider) GetDescription() string + func (self *Spider) GetEnableCookie() bool + func (self *Spider) GetId() int + func (self *Spider) GetItemField(rule *Rule, index int) (field string) + func (self *Spider) GetItemFieldIndex(rule *Rule, field string) (index int) + func (self *Spider) GetItemFields(rule *Rule) []string + func (self *Spider) GetKeyin() string + func (self *Spider) GetLimit() int64 + func (self *Spider) GetName() string + func (self *Spider) GetRule(ruleName string) (*Rule, bool) + func (self *Spider) GetRules() map[string]*Rule + func (self *Spider) GetSubName() string + func (self *Spider) IsStopping() bool + func (self *Spider) MustGetRule(ruleName string) *Rule + func (self *Spider) OutDefaultField() bool + func (self *Spider) ReqmatrixInit() *Spider + func (self *Spider) RequestFree() + func (self *Spider) RequestLen() int + func (self *Spider) RequestPull() *request.Request + func (self *Spider) RequestPush(req *request.Request) + func (self *Spider) RequestUse() + func (self *Spider) RunTimer(id string) bool + func (self *Spider) SetId(id int) + func (self *Spider) SetKeyin(keyword string) + func (self *Spider) SetLimit(max int64) + func (self *Spider) SetPausetime(pause int64, runtime ...bool) + func (self *Spider) SetTimer(id string, tol time.Duration, bell *Bell) bool + func (self *Spider) Start() + func (self *Spider) Stop() + func (self *Spider) TryFlushFailure() + func (self *Spider) TryFlushSuccess() + func (self *Spider) UpsertItemField(rule *Rule, field string) (index int) + func (self Spider) Register() *Spider + type SpiderModle struct + Description string + EnableCookie bool + EnableKeyin bool + EnableLimit bool + Name string + Namespace string + NotDefaultField bool + Pausetime int64 + Root string + SubNamespace string + Trunk []RuleModle + type SpiderSpecies struct + func (self *SpiderSpecies) Add(sp *Spider) *Spider + func (self *SpiderSpecies) Get() []*Spider + func (self *SpiderSpecies) GetByName(name string) *Spider + type Timer struct