README ¶ what TinySpider是一款轻量级的爬虫框架, 使用Go语言编写. 提供最小化的callback function, 简单易用. DOM操作使用goquery库. why 该框架旨在轻量化, 不过度封装, 让使用者能够更灵活地使用. 适合小型爬虫项目, 或者作为爬虫框架的入门学习. how 参考example目录下的例子, 简单易懂. Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type Spider func NewSpider() *Spider func (s *Spider) AddTask(task func(doc *goquery.Document)) func (s *Spider) AfterReq(cb func(res *http.Response) error) func (s *Spider) BeforeReq(cb func(req *http.Request) error) func (s *Spider) Get(url string) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Spider ¶ type Spider struct { URL string // contains filtered or unexported fields } func NewSpider ¶ func NewSpider() *Spider func (*Spider) AddTask ¶ func (s *Spider) AddTask(task func(doc *goquery.Document)) func (*Spider) AfterReq ¶ func (s *Spider) AfterReq(cb func(res *http.Response) error) func (*Spider) BeforeReq ¶ func (s *Spider) BeforeReq(cb func(req *http.Request) error) func (*Spider) Get ¶ func (s *Spider) Get(url string) error Source Files ¶ View all Source files spider.go Directories ¶ Show internal Expand all Path Synopsis example extension Click to show internal directories. Click to hide internal directories.