ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
![](https://img.kancloud.cn/99/6c/996c1466cb0b8e1cd5da9fbd7029f07c_1075x46.png) 有些图片地址在懒加载属性中,需要这样设置 ~~~ package main import ( articleSpider "github.com/PeterYangs/article-spider/v3" ) func main() { f := articleSpider.Form{ Host: "http://www.lfdsw.cn", Channel: "/game/page/[PAGE]/", PageStart: 1, Length: 3, ListSelector: "body > main > div > div.category.uk-background-muted.uk-margin-bottom > div > div.uk-grid-small.uk-grid > div", HrefSelector: " div > a.icon", ListFields: map[string]articleSpider.Field{ "img": {Types: articleSpider.Image, Selector: " div > a.icon > img"}, }, LazyImageAttrName: "data-src", } s := articleSpider.NewSpider(f, articleSpider.Normal) s.Start() } ~~~ >[info]**LazyImageAttrName**设置懒加载属性