Closed Wangzhijie2016 closed 6 years ago
Ohi, Proxying only one request can be achieved multiple ways. You can use two collectors, one with proxy and another without proxy:
c := colly.NewCollector()
c2 := colly.NewCollector()
c2.SetProxy("http://127.0.0.1:8080/")
// ...
or you can unset the proxy after the first request:
c := colly.NewCollector()
c.SetProxy("http://127.0.0.1:8080")
c.Visit("http://example.com/")
c.SetProxyFunc(nil)
// ...
Ok i try it, thanks
I found
but if i have ten urls need request, this way is all request to use proxy, i only want one request to use the proxy, What should I do?