package kuaidaili import ( "fmt" "git.aionnect.com/hello-go/spider/common" "git.aionnect.com/hello-go/spider/spiders" "net/http" "testing" ) func TestFreePagingSpider(t *testing.T) { // 从起始页开始执行爬虫 params := &common.ProxyPagingParams{PagingNo: 1, Limit: 1000} startingUrl := fmt.Sprintf(TargetUrl, params.PagingNo) target := &common.Target{ Key: KuaiDaiLi, Method: http.MethodGet, URL: startingUrl, Item: params, } spiders.Run(target, NewFreePagingSpider(), ) }