合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
```go 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{ "content": {Types: articleSpider.HtmlWithImage, Selector: "#content"}, }, } s := articleSpider.NewSpider(f, articleSpider.Normal) s.Start() } ``` >[info]**HtmlWithImage**会将html中的img标签的图片地址下载下来并替换成本地路径