antchfx / antch

Antch, a fast, powerful and extensible web crawling & scraping framework for Go
MIT License
260 stars 41 forks source link

Example for proxy #8

Open safeallahee opened 6 years ago

safeallahee commented 6 years ago

hi can you add example for proxy usage with antch!?

zhengchun commented 6 years ago

It's very simple, just call UseProxy() method.

crawler := &antch.Crawler{}
proxyURL, _:= url.Parse("https://127.0.0.1:8080")
crawler.UseProxy(proxyURL)

proxy middle supported http, https, socks5. https://godoc.org/github.com/antchfx/antch#Crawler.UseProxy

safeallahee commented 5 years ago

thank you