How can i restricts third parties URLs in go-colly?

(Anuj) #1

I have to crawl suppose domain ,in visiting URLs it redirect to lots of third parties URLs like, etc.

Is there any rules for go colly to restriction of domain like scrapy linkextractor rules?

(Johan Dahl) #2

colly.Collector has a field AllowedDomains. Try setting this.

(Johan Dahl) #3

And also RedirectHandler in Collector can be used