Documentation ¶
Index ¶
Constants ¶
View Source
const ContentRe = `<div class="topic-content">[\s\S]*?阳台[\s\S]*?<div class="aside">`
Variables ¶
View Source
var GroupTask = &spider.Task{ Rule: spider.RuleTree{ Root: func() ([]*spider.Request, error) { var roots []*spider.Request for i := 0; i < 25; i += 25 { str := fmt.Sprintf("https://www.douban.com/group/szsh/discussion?start=%d", i) roots = append(roots, &spider.Request{ Priority: 1, URL: str, Method: "GET", RuleName: "解析网站URL", }) } return roots, nil }, Trunk: map[string]*spider.Rule{ "解析网站URL": {ParseFunc: ParseURL}, "解析阳台房": {ParseFunc: GetSunRoom}, }, }, }
Functions ¶
func GetSunRoom ¶
func GetSunRoom(ctx *spider.Context) (spider.ParseResult, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.