Documentation ¶
Index ¶
- type ChiphellMonitor
- func (c *ChiphellMonitor) FetchPageContent() (string, error)
- func (c *ChiphellMonitor) FetchPostMainContent(postURL string) (string, string, string, string, string, error)
- func (c *ChiphellMonitor) MonitorPage()
- func (c *ChiphellMonitor) ParseContent(content string) ([]Post, error)
- func (c *ChiphellMonitor) ProcessPosts(posts []Post) error
- type ForumMonitor
- type NotificationMessage
- type Post
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChiphellMonitor ¶
type ChiphellMonitor struct { ForumName string Cookies string UserKeywords map[string][]string // 手机号及其关键词的映射 Notifier *notifier.DingTalkNotifier Database *db.Database Logger *mylog.Logger MessageQueue chan NotificationMessage WaitTimeRange struct { Min int Max int } ProxyAPI string }
func NewChiphellMonitor ¶ added in v1.1.0
func (*ChiphellMonitor) FetchPageContent ¶
func (c *ChiphellMonitor) FetchPageContent() (string, error)
获取页面内容 FetchPageContent 使用代理池并发请求访问论坛页面
func (*ChiphellMonitor) FetchPostMainContent ¶ added in v1.2.2
func (*ChiphellMonitor) MonitorPage ¶
func (c *ChiphellMonitor) MonitorPage()
func (*ChiphellMonitor) ParseContent ¶
func (c *ChiphellMonitor) ParseContent(content string) ([]Post, error)
func (*ChiphellMonitor) ProcessPosts ¶
func (c *ChiphellMonitor) ProcessPosts(posts []Post) error
type ForumMonitor ¶
type ForumMonitor interface { FetchPageContent() (string, error) ParseContent(content string) ([]Post, error) ProcessPosts(posts []Post) error MonitorPage() }
func NewMonitor ¶ added in v1.1.9
type NotificationMessage ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.