Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadStatusCodeError ¶
type BadStatusCodeError struct {
StatusCode int
}
BadStatusCodeError 是当响应的状态码并非 2xx 时返回的错误
func (BadStatusCodeError) Error ¶
func (err BadStatusCodeError) Error() string
func (BadStatusCodeError) Temporary ¶
func (err BadStatusCodeError) Temporary() bool
Temporary 返回此错误是否是临时性的
type HTTPResponseGoqueryDecorator ¶
type HTTPResponseGoqueryDecorator struct{}
HTTPResponseGoqueryDecorator 将得到的 HTTP 响应中的 body 转换为 goquery 文档 响应的 body 应是 html/xml 文档
func (HTTPResponseGoqueryDecorator) DecoratePayload ¶
func (HTTPResponseGoqueryDecorator) DecoratePayload(c *nyn.Crawler, _ nyn.Task, payload interface{}) (decoratedPayload interface{}, err error)
DecoratePayload 转换 payload
type HTTPResponseJSONDecorator ¶
type HTTPResponseJSONDecorator struct{}
HTTPResponseJSONDecorator 将得到的 HTTP 响应中的 body 解析
func (HTTPResponseJSONDecorator) DecoratePayload ¶
func (HTTPResponseJSONDecorator) DecoratePayload(c *nyn.Crawler, task nyn.Task, payload interface{}) (decoratedPayload interface{}, err error)
DecoratePayload 转换 payload
type HTTPURLGetFetcher ¶
type HTTPURLGetFetcher struct { }
HTTPURLGetFetcher 包装了 http url get 任务的 fetcher
Click to show internal directories.
Click to hide internal directories.