Colly (Go) · CONFIGURAR PROXY

Configurar proxy no Colly (Go)

The scraping framework for Go. Aponte para o pool residencial da Eveses com a configuração abaixo — a geolocalização fica no nome de usuário, então trocar de país não exige mexer em mais nada.

proxy.eveses.com:12321 · SOCKS5 em 32325 · 199 países · a partir de $7.35/GB

Atenção

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.

Configuração

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()
}

Notas para 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.

Troque de país sem mexer no Colly (Go)

Alemanhaeveses_user_country-de
Fixa por 30 mineveses_user_country-de_session-ab12cd34_lifetime-30m

A geolocalização e a sessão ficam no nome de usuário, não no host nem na porta. Toda a configuração desta página continua igual quando você troca de país — você edita uma única string. São 199 países endereçáveis, com tokens de cidade e região na maioria deles.

Perguntas frequentes

Como configuro um proxy no Colly (Go)?›
Aponte para proxy.eveses.com, porta 12321 para HTTP ou 32325 para SOCKS5, e autentique com seu usuário e senha de proxy da Eveses. A sintaxe exata está no trecho acima. 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.
Como escolho o país pelo qual o Colly (Go) sai?›
Acrescente um token de geolocalização ao NOME DE USUÁRIO em vez de trocar o host: eveses_user_country-de sai pela Alemanha, eveses_user_country-us pelos Estados Unidos. Assim são 199 países endereçáveis, e tokens de cidade ou região afinam mais. Nada mais muda na sua configuração do Colly (Go).
Como mantenho o mesmo IP entre requisições no Colly (Go)?›
Acrescente um token de sessão — eveses_user_country-us_session-ab12cd34_lifetime-30m — e toda requisição com esse usuário sai pelo mesmo endereço até o tempo acabar. Sem o token, cada requisição rotaciona para um IP novo.
Quanto custa?›
O tráfego residencial é cobrado por gigabyte da sua carteira Eveses: $7.35/GB a 1 GB, caindo para $2.57/GB em volume. Não há cobrança por ferramenta, e as mesmas credenciais valem em todas ao mesmo tempo.

Outras integrações

Rode Colly (Go) sobre IPs residenciais

$7.35/GB a 1 GB, $2.57/GB em volume — as mesmas credenciais em todas as ferramentas.

Obter proxies →