Colly (Go) · プロキシ設定

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-de
30分固定eveses_user_country-de_session-ab12cd34_lifetime-30m

地域とセッションはユーザー名の中にあり、ホストやポートにはありません。国を変えてもこのページの設定はそのままで、書き換えるのは1つの文字列だけです。199か国を指定でき、その多くでは都市・州のトークンも使えます。

よくある質問

Colly (Go)でプロキシを設定するには?›
proxy.eveses.com に向け、HTTP ならポート12321、SOCKS5 なら32325を使い、Eveses のプロキシ用ユーザー名とパスワードで認証します。正確な書き方は上のスニペットにあります。 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.
Colly (Go)の出口の国を選ぶには?›
ホストを変えるのではなく、ユーザー名に地域トークンを付けます。eveses_user_country-de ならドイツ、eveses_user_country-us なら米国です。この方法で199か国を指定でき、都市や州のトークンでさらに絞れます。Colly (Go)側の設定はそれ以外何も変わりません。
Colly (Go)でリクエスト間に同じIPを保つには?›
セッショントークンを足します — eveses_user_country-us_session-ab12cd34_lifetime-30m。このユーザー名を使うリクエストは、有効期間が切れるまで同じアドレスから出ます。トークンを外せば、リクエストごとに新しいIPへローテーションします。
料金は?›
住宅用トラフィックは Eveses ウォレットからGB単位で課金されます。1 GB で$7.35/GB、大容量では$2.57/GB まで下がります。ツールごとの料金はなく、同じ認証情報がすべてのツールで同時に使えます。

ほかの連携

住宅用IPでColly (Go)を動かす

1 GB で$7.35/GB、大容量なら$2.57/GB — どのツールでも同じ認証情報。

プロキシを入手 →