Más IP únicas que cualquier red del planeta, en el mayor pool residencial del mundo. Eso es Shifter.Más IP únicas que cualquier red, en el mayor pool del mundo. Eso es Shifter.

Ver los números
Integración

Usa Shifter con Selenium

Conecta los proxies residenciales e ISP de Shifter a Selenium WebDriver en Python, Java, JavaScript, C# y Ruby. Compatible con Chrome, Firefox y Edge; combínalo con selenium-wire para autenticación completa con usuario y contraseña en modo headless.

Inicio rápido

Instalar

pip install selenium selenium-wire

Uso básico

# selenium-wire is a drop-in replacement for selenium that adds first-class
# support for authenticated proxies in headless mode.
from seleniumwire import webdriver
from selenium.webdriver.chrome.options import Options

options = Options()
options.add_argument("--headless=new")

seleniumwire_options = {
    "proxy": {
        "http":  "customer-USERNAME-country-us-sid-123ABC:PASSWORD@p.shifter.io:443",
        "https": "customer-USERNAME-country-us-sid-123ABC:PASSWORD@p.shifter.io:443",
        "no_proxy": "localhost,127.0.0.1",
    }
}

driver = webdriver.Chrome(
    options=options,
    seleniumwire_options=seleniumwire_options,
)

driver.get("http://ip-info.com/json")
print(driver.find_element("tag name", "body").text)
# {"ip": "154.16.xxx.xxx", "city": "New York", "country": "US", ...}

driver.quit()

Características

Soporte directo para clientes Selenium en Python, Java, JavaScript, C# y Ruby
Proxies autenticados en modo headless mediante selenium-wire (Python) o BrowserMob (Java)
El flag estándar --proxy-server funciona con Chrome, Edge y Firefox cuando se combina con autenticación por lista blanca de IPs
Geolocalización en más de 195 países mediante parámetros de usuario -- país, región, ciudad, ASN
Rotación por solicitud de forma predeterminada, con `sid` para sesiones persistentes y `ttl-N` para fijar IPs durante N segundos
Compatible con Selenium Grid, runners de GitHub Actions y cualquier pipeline de scraping basado en contenedores

Ejemplos

Python + selenium-wire (sesión persistente)

selenium-wire enruta el tráfico a través de un MITM en proceso, lo que significa que los proxies con usuario y contraseña funcionan sin problemas en Chrome headless. Añade un `sid` para obtener una IP residencial fija durante toda la sesión.

from seleniumwire import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import secrets

sid = secrets.token_hex(4)

options = Options()
options.add_argument("--headless=new")
options.add_argument(
    "--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
)

proxy_url = (
    f"customer-USERNAME-country-uk-city-london-sid-{sid}-ttl-300:"
    f"PASSWORD@p.shifter.io:443"
)

driver = webdriver.Chrome(
    options=options,
    seleniumwire_options={"proxy": {"http": proxy_url, "https": proxy_url}},
)

# Multi-step flow — same residential IP across every navigation.
driver.get("https://example.co.uk/login")
driver.find_element(By.ID, "email").send_keys("user@example.com")
driver.find_element(By.ID, "password").send_keys("secret")
driver.find_element(By.CSS_SELECTOR, "button[type=submit]").click()

WebDriverWait(driver, 10).until(EC.url_contains("/dashboard"))

rows = driver.find_elements(By.CSS_SELECTOR, ".order-row")
print(f"Found {len(rows)} orders on dashboard")

driver.quit()

Selenium estándar (sin extras): autenticación por lista blanca de IPs

Si no quieres selenium-wire como dependencia, usa la autenticación por lista blanca de IPs de Shifter y configura el proxy mediante ChromeOptions estándar. Dependencias más limpias, pero debes añadir tu host de scraping a la lista blanca.

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By

options = Options()
options.add_argument("--headless=new")
options.add_argument("--proxy-server=http://p.shifter.io:443")
options.add_argument(
    "--user-agent=Mozilla/5.0 (Macintosh) AppleWebKit/537.36"
)

# When using IP-whitelist auth, your scrape host's outbound IP is
# pre-authorized — no username/password needed in the URL.
driver = webdriver.Chrome(options=options)

driver.get("https://example.com")
print(driver.title)

products = driver.find_elements(By.CSS_SELECTOR, ".product")
for p in products[:5]:
    title = p.find_element(By.CSS_SELECTOR, "h2").text
    price = p.find_element(By.CSS_SELECTOR, ".price").text
    print(title, price)

driver.quit()

Java con equivalente a selenium-wire (BrowserMob)

Java no tiene selenium-wire, pero BrowserMob Proxy cumple la misma función: inicia un proxy local que añade cabeceras de autenticación básica y luego apunta Selenium hacia él.

import net.lightbody.bmp.BrowserMobProxy;
import net.lightbody.bmp.BrowserMobProxyServer;
import net.lightbody.bmp.client.ClientUtil;
import org.openqa.selenium.Proxy;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import java.net.InetSocketAddress;

public class SeleniumShifter {
  public static void main(String[] args) {
    BrowserMobProxy proxy = new BrowserMobProxyServer();
    proxy.setChainedProxy(new InetSocketAddress("p.shifter.io", 443));
    proxy.chainedProxyAuthorization(
        "customer-USERNAME-country-de-sid-456DEF", "PASSWORD",
        net.lightbody.bmp.proxy.auth.AuthType.BASIC);
    proxy.start(0);

    Proxy seleniumProxy = ClientUtil.createSeleniumProxy(proxy);
    ChromeOptions options = new ChromeOptions();
    options.setProxy(seleniumProxy);
    options.addArguments("--headless=new");

    WebDriver driver = new ChromeDriver(options);
    try {
      driver.get("https://example.de");
      System.out.println(driver.getTitle());
    } finally {
      driver.quit();
      proxy.stop();
    }
  }
}

Selenium Grid (navegadores en paralelo)

Cuando escales a un hub de Grid con varios nodos, configura Shifter una sola vez a nivel de Capabilities: cada nodo enrutará a través de Shifter sin necesidad de configuración por nodo.

from selenium import webdriver
from selenium.webdriver.common.proxy import Proxy, ProxyType
from selenium.webdriver.chrome.options import Options

# Use selenium-wire-equivalent or Shifter IP whitelist for auth.
proxy_str = "p.shifter.io:443"

shared_proxy = Proxy()
shared_proxy.proxy_type = ProxyType.MANUAL
shared_proxy.http_proxy = proxy_str
shared_proxy.ssl_proxy  = proxy_str

options = Options()
options.proxy = shared_proxy
options.add_argument("--headless=new")

# Grid hub
HUB_URL = "http://selenium-hub.internal:4444/wd/hub"

driver = webdriver.Remote(command_executor=HUB_URL, options=options)

try:
    driver.get("https://example.com")
    print(driver.title, len(driver.page_source), "bytes")
finally:
    driver.quit()
Preguntas frecuentes

Preguntas frecuentes

Preguntas frecuentes sobre el uso de Shifter con Selenium.

Usa selenium-wire (Python) o BrowserMob Proxy (Java). Ambos ejecutan un proxy MITM local que inyecta cabeceras de autenticación básica: Chrome y Firefox aceptan el proxy interno sin solicitar credenciales, incluso en modo headless. También puedes usar la autenticación por lista blanca de IPs de Shifter y prescindir de las credenciales por completo.

Chrome no muestra diálogos de autenticación de proxy en modo sin interfaz gráfica y no hay forma nativa de introducir credenciales por línea de comandos. selenium-wire soluciona esto ejecutando un proxy local que gestiona la autenticación por sí mismo. La otra opción es el modo de lista blanca de IPs de Shifter: la IP de salida del host de scraping está preautorizada, por lo que no se necesitan credenciales.

Pass --proxy-server=http://p.shifter.io:443 in ChromeOptions. For username-password auth in headless mode, use selenium-wire (Python) or BrowserMob (Java). For visible Chrome, page.authenticate() in the underlying CDP works, but most scrapers use selenium-wire as the cleanest option.

Añade un ID de sesión al nombre de usuario del proxy, por ejemplo `customer-USERNAME-country-us-sid-123ABC`. Cada solicitud a través de la misma sesión de WebDriver reutilizará la misma IP residencial. Añade `ttl-N` para fijar la IP durante un máximo de N segundos.

Sí. Configura el proxy a nivel de Capabilities o ChromeOptions al crear el Remote WebDriver: cada nodo de Grid enrutará a través de Shifter. Combínalo con sids únicos por trabajador para escalar el scraping en paralelo sin compartir IPs.

Si empiezas desde cero, Playwright suele ser más sencillo: la autenticación de proxy funciona de forma nativa, la compatibilidad con múltiples navegadores está integrada y la API es más limpia. Selenium sigue siendo la opción correcta para suites de pruebas heredadas, móvil (Appium) o cuando tu equipo ya lo tiene estandarizado. Shifter funciona igual de bien con ambos.

Comenzar

Empieza a usar Shifter con Selenium

Conecta Selenium WebDriver a través de los más de 205M+ proxies residenciales y de ISP de Shifter en Python, Java y otros lenguajes. Indicador nativo --proxy-server, selenium-wire para autenticación sin interfaz gráfica y compatibilidad total con Selenium Grid.

Configuración en minutos. Cancela cuando quieras.