rule

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PowerfulFind added in v0.0.3

func PowerfulFind(s *goquery.Selection, q string) *goquery.Selection

Types

type Fun added in v0.0.3

type Fun struct {
	Name   string
	Raw    string
	Params []string

	Document  *goquery.Document
	Selection *goquery.Selection
	Result    string

	PrevFun *Fun
	NextFun *Fun
}

func ParseFun added in v0.0.3

func ParseFun(sel *goquery.Selection, str string) *Fun

func (*Fun) Append added in v0.0.3

func (f *Fun) Append(s string) (*Fun, *Fun)

func (*Fun) InitSelector added in v0.0.3

func (f *Fun) InitSelector() error

func (*Fun) Invoke added in v0.0.3

func (f *Fun) Invoke() (string, error)

type Result

type Result struct {
	Name    string
	Channel string
	Mode    string
	Result  []string
}

type Rule

type Rule struct {
	Name    string `yaml:"name"`
	Channel string `yaml:"channel"`
	When    string `yaml:"when"`
	Mode    string `yaml:"mode"`
	Page    struct {
		URL  string            `yaml:"url"`
		List string            `yaml:"list"`
		Item map[string]string `yaml:"item"`
	}
}

func (Rule) Run added in v0.0.22

func (r Rule) Run() []string

Jump to

Keyboard shortcuts

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