subscribe

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Rules = map[string]rule.Rule{
	"news": {
		When:    "* * * * *",
		Instant: false,
		Action: func() []string {
			var result []string

			doc, err := rule.Document("https://www.v2ex.com/?tab=nodes")
			if err != nil {
				return result
			}

			doc.Find(".box .item").Each(func(i int, s *goquery.Selection) {
				title := s.Find(".item_title a").Text()
				result = append(result, title)
			})
			return result
		},
	},
	"demo": {
		When:    "*/10 * * * *",
		Instant: false,
		Action: func() []string {
			return []string{}
		},
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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