💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
~~~ package main import ( articleSpider "github.com/PeterYangs/article-spider/v3" ) func main() { f := articleSpider.Form{ Host: "https://www.shouyouzhijia.net", Channel: "/xinwen_[PAGE]/", 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, ExcelHeader: "B", Selector: "body > div.Min-cent.W1200 > div.Min_L > div.Left_top > h1"}, }, CustomExcelHeader: true, } s := articleSpider.NewSpider(f, articleSpider.Normal) s.Start() } ~~~ >[info]Fields中的**ExcelHeader**设置excel行,**CustomExcelHeader**设置为true