Documentation ¶
Index ¶
Constants ¶
View Source
const ( ContentRe = `<div class="topic-content">[\s\S]*?阳台[\s\S]*?<div class="aside">` FindSumRoomTaskName = "find_douban_sun_room" )
Variables ¶
View Source
var DoubangroupTask = &spider.Task{ Options: spider.Options{Name: FindSumRoomTaskName}, Rule: spider.RuleTree{ Root: func() ([]*spider.Request, error) { var roots []*spider.Request for i := 0; i < 25; i += 25 { roots = append(roots, &spider.Request{ URL: fmt.Sprintf(discussionURL, i), Method: "GET", Priority: 1, 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.