crawl

package
v0.0.0-...-3c3d79d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crawl

type Crawl struct {
}

func NewCrawler

func NewCrawler() *Crawl

func (*Crawl) Filter

func (craw *Crawl) Filter(rule string) chan *Page

监听指定规则过滤后的页面

func (*Crawl) JoinUrl

func (craw *Crawl) JoinUrl(ctx context.Context)

加入url

func (*Crawl) Work

func (craw *Crawl) Work(ctx context.Context)

开始抓取

type Page

type Page struct {
	Url url.URL
	// contains filtered or unexported fields
}

func (*Page) GoQuery

func (craw *Page) GoQuery() goquery.Selection

func (*Page) Param

func (craw *Page) Param(name string) (string, error)

获取路由参数

type Route

type Route struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL