多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
有些地方的栏目链接不按套路出牌,可以使用**ChannelFunc**自定义栏目 ``` package main import ( articleSpider "github.com/PeterYangs/article-spider/v3" ) func main() { f := articleSpider.Form{ Host: "https://www.shouyouzhijia.net", ChannelFunc: func(form *articleSpider.Form) []string { return []string{ "/xinwen_1/", "/xinwen_2/", "/xinwen_3/", "/xinwen_4/", "/xinwen_5/", "/xinwen_6/", "/xinwen_7/", "/xinwen_8/", "/xinwen_9/", } }, PageStart: 1, Length: 3, ListSelector: "body > div.main.newex.clearfix > div.LC_lef > div.lef_content > dl", HrefSelector: " dd > h3 > a", DetailFields: map[string]articleSpider.Field{ "title": {Types: articleSpider.Text, Selector: "body > div.Min-cent.W1200 > div.Min_L > div.Left_top > h1"}, }, } s := articleSpider.NewSpider(f, articleSpider.Normal) s.Start() } ```