crawler

package
v0.0.0-...-180eea0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	Name            string
	Author          string
	Publisher       string
	RatingNums      float64
	TotalComment    string
	TotalCommentNum int
	Cover           string
	Desc            string
}

Book represents the book information.

type Crawler

type Crawler struct {
	Options
}

Crawler represents the data crawler.

func New

func New() (*Crawler, error)

New creates crawler instance.

func (*Crawler) SearchList

func (c *Crawler) SearchList() error

SearchList lists books.

type Options

type Options struct {
	Verbose   bool
	Keyword   string
	Start     int
	Page      int
	LocalMode bool
	LocalFile string
	Interval  int
}

Options contains the crawler supported options.

type Response

type Response struct {
	Total int
	Items []string
	Limit int
	More  bool
}

Response represents the HTTP response data struct from Douban.

Jump to

Keyboard shortcuts

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