go colly 限制请求并发数

    
    import "github.com/gocolly/colly/v2"

    c := colly.NewCollector()
	rule := &colly.LimitRule{
		RandomDelay: time.Second,
		Parallelism: 10, //并发数为10
	}
	_ = c.Limit(rule)

 

你可能感兴趣的:(go,爬虫,并发)