Colly (Go)のプロキシ設定
The scraping framework for Go. 下の設定で Eveses の住宅用プールに向けてください。地域指定はユーザー名の中にあるので、国を変えるのに他の設定を触る必要はありません。
proxy.eveses.com:12321 · SOCKS5 は 32325 · 199か国 · $7.35/GB から
Colly ships `proxy.RoundRobinProxySwitcher`, which rotates a fixed LIST of proxy URLs. With a rotating pool you want the opposite: one URL, and the pool rotates behind it. Feeding the switcher one URL is correct and the round-robin is simply unused.
設定
package main
import (
"github.com/gocolly/colly/v2"
"github.com/gocolly/colly/v2/proxy"
)
func main() {
c := colly.NewCollector(colly.Async(true))
// One URL: the pool rotates behind it, so the switcher has nothing to do.
rp, err := proxy.RoundRobinProxySwitcher(
"http://eveses_user_country-us:[email protected]:12321",
)
if err != nil { panic(err) }
c.SetProxyFunc(rp)
c.OnHTML("title", func(e *colly.HTMLElement) { println(e.Text) })
c.Visit("https://target-site.com")
c.Wait()
}Colly (Go)に関する注意
Set Limit() with a Parallelism cap; Colly's async mode will otherwise open as many connections as it has URLs.
Give each parallel worker its own session token if the target ties state to an IP.
Colly (Go)を触らずに国を変える
eveses_user_country-deeveses_user_country-de_session-ab12cd34_lifetime-30m地域とセッションはユーザー名の中にあり、ホストやポートにはありません。国を変えてもこのページの設定はそのままで、書き換えるのは1つの文字列だけです。199か国を指定でき、その多くでは都市・州のトークンも使えます。