bot

package
v0.0.0-...-61f6f03 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BotMode     = 30
	OfflineMode = 10 * 30
)

Variables

View Source
var ErrorChapNotFound = errors.New("Chap not found")

Functions

func Register

func Register(c Collector)

func Run

func Run(url []string, name string, chap int, dir string) []string

func RunOffline

func RunOffline(url []string, name string, dir string, start int)

Types

type Bot

type Bot struct {
	Colly *colly.Collector
}

func (*Bot) Collect

func (b *Bot) Collect(base string, chap int, outputDir string) error
func (b *Bot) GetLink(base string, chap int) string

func (*Bot) Page

func (b *Bot) Page() string

func (*Bot) Visit

func (b *Bot) Visit(url string)

type Collector

type Collector interface {
	Collect(base string, chap int, outputDir string) error
	Page() string
	GetLink(base string, chap int) string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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