代码拉取完成,页面将自动刷新
package WebCrawler
import "github.com/PuerkitoBio/goquery"
type WebPage struct {
Host string
Url string
Head *WebHead
Hrefs map[string]*WebHref
Texts []*WebElement
Images []*WebElement
}
type WebHead struct {
Title string
Description string
Keywords []string
}
type WebHref struct {
Href string
Title string
}
type WebElement struct {
Tag string
Selection *goquery.Selection
Text string
}
func (e *WebElement) Clone() *WebElement {
clone := &WebElement{
Tag: e.Tag,
Selection: e.Selection,
Text: e.Text,
}
return clone
}
type Mode uint32
const (
ModeContain = Mode(1) // 包含:字符串
ModeEqual = Mode(2) // 相同:字符串
ModeRegexp = Mode(3) // 正则表达式
ModeElTag = Mode(4) // 元素的类型
)
type Filter struct {
Mode Mode
Param interface{}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。