Direct Engineering Answer

Run high-throughput crawls in Scrapy over Webshare Datacenter ($2.99/100 shared IPs, down to $0.0179/IP bulk) or Static Residential ISP ($6.00/20 IPs unlimited FUP) using either the p.webshare.io:80 -rotate backbone or an in-memory health ring hydrated from REST API v2 (/api/v2/proxy/list/). For Selenium ChromeDriver, avoid inline username:password URIs in --proxy-server (which fail on HTTP/SOCKS5 auth dialogs) by whitelisting your runner IP (sourceip) in Webshare, routing through a local authenticated forwarder, or switching stateful browser workloads to Playwright HTTP contexts—and always enforce disable_non_proxied_udp to block WebRTC IP leaks.

Scrapy Concurrency Spine
p.webshare.io:80 (-rotate) or REST API v2 Pool
Selenium Auth Strategy
IP Whitelist (sourceip) or Loopback Forwarder
Entry Unit Cost
$0 Free (10 IPs) · $0.0179–$0.03/IP DC · $6 ISP
Critical Leak Defense
disable_non_proxied_udp + Cookie Jar Isolation
2026 Verified Webshare Tier

Start With 10 Free Shared IPs (No Credit Card Required)

Spin up HTTP & SOCKS5 credentials or whitelist your server IP via REST API v2 in under two minutes.

Activate Free Tier → View 5x13 Matrix

Why Scrapy and Selenium Demand Fundamentally Different Proxy Topologies

Engineering teams frequently treat Scrapy and Selenium as interchangeable scraping tools that share the same proxy wrapper, only to watch Selenium containers stall at 15 pages per minute while Scrapy spiders trigger instant HTTP 407 or cookie-leak bans across thousands of concurrent requests. At the operating-system and network level, the two frameworks execute on completely opposite runtime paradigms. Scrapy runs atop Python's Twisted asynchronous event reactor, multiplexing hundreds of non-blocking TCP sockets across a single process with minimal memory overhead (~40 MB base plus ~1.5 MB per active request slot). Selenium drives an out-of-process browser engine (Chromium or Gecko) via the W3C WebDriver HTTP protocol, spawning multi-process renderers, GPU compositors, and full V8 JavaScript heaps for every browser instance.

Because Scrapy executes raw HTTP requests directly inside Twisted's HTTP11ClientProtocol (or optional HTTP/2 handlers), every single request dictionary exposes request.meta['proxy'] cleanly before socket creation. You can switch between a Datacenter proxy on p.webshare.io:80, a sticky Residential session on p.webshare.io, and a Static ISP proxy IP between consecutive URLs inside the exact same spider run without restarting any daemon. Furthermore, Scrapy's built-in RetryMiddleware and AutoThrottle extensions can read target response headers, inspect HTTP 429 or soft-block bodies, penalize an individual proxy endpoint inside an in-memory quarantine ring, and immediately replay the failed request over a healthy replacement IP.

Selenium WebDriver operates under far tighter constraints. Chromium binds its --proxy-server configuration at browser startup and treats proxy authentication as an interactive user dialog rather than a silent per-request metadata hook. Native ChromeDriver cannot accept inline username:password@host:port syntax inside --proxy-server=http:// or --proxy-server=socks5:// without popping an OS auth prompt or failing with ERR_NO_SUPPORTED_PROXIES. Consequently, mature data pipelines run 90%+ of discovery, sitemap walking, pagination, and JSON extraction inside Scrapy backed by Webshare Datacenter or Static ISP proxies, escalating only deeply interactive JavaScript forms or canvas-gated endpoints to isolated Selenium (or Playwright) workers.

  • Scrapy Twisted Reactor: Excels at 64 to 512 concurrent async connections per container, natively supports per-request HTTP Proxy-Authorization headers (Basic base64), and handles 100+ Gbps Webshare Datacenter backbones effortlessly.
  • Scrapy Cookie Trap: By default, COOKIES_ENABLED = True shares a global cookie jar per spider, meaning rotating IPs while sending the same session cookie leaks your IP-rotation pattern to WAFs. Always partition cookiejar keys per sticky proxy identity or disable cookies on stateless crawls.
  • Selenium ChromeDriver Constraint: Binds one static proxy endpoint per browser process and lacks native SOCKS5 RFC 1929 auth or seamless HTTP 407 credential injection without IP whitelisting (sourceip) or a local proxy bridge.
  • Free Sandbox Validation: Always test Scrapy DownloaderMiddleware retries and Selenium proxy flags first against Webshare's permanent Free 10 Proxies plan ($0/mo, 10 shared datacenter IPs, 1 GB/mo, zero credit card) before unlocking bulk Datacenter or Residential capacity.

Two Webshare Rotation Architectures: Backbone Gateway vs. REST API v2 Pool Ring

Webshare supports two distinct architectural models for feeding proxies into Scrapy and Selenium workers, and selecting the right one eliminates most operational fragility. The first architecture uses Webshare's unified backbone spine at p.webshare.io (port 80 for HTTP/HTTPS CONNECT tunnels and port 1080 for SOCKS5). Passing -rotate inside the proxy username (for example, myuser-rotate:[email protected]:80) directs Webshare's routing fabric to assign a fresh exit IP from your allocated Datacenter, Static ISP, or 80M+ Rotating Residential pool on every new request. For multi-step login or pagination flows where a target binds session cookies to a single IP, omitting -rotate or attaching a country plus deterministic session suffix (such as myuser-us-shard07) locks a sticky tunnel to one exit IP across subsequent requests.

The second architecture bypasses the single backbone hostname and pulls your exact static proxy inventory directly from Webshare REST API v2 (https://proxy.webshare.io/api/v2/proxy/list/) using an Authorization: Token <API_KEY> header—or via Webshare's automated plain-text proxy download URL available inside your dashboard. When you pull direct host:port pairs for Datacenter ($2.99/mo for 100 shared IPs, down to $0.0179/IP in bulk; Private max-2-owner and Dedicated 1-owner plans) or Static Residential ISP ($6.00/mo for 20 IPs on AT&T, Sprint, and Cox consumer ASNs with unlimited Fair Usage Policy bandwidth), Scrapy can build a priority-weighted ring buffer that tracks latency, error rate, and cooldown expiration per exact IPv4 exit.

Maintaining an explicit API-synced pool ring gives engineering teams two decisive advantages over blind gateway rotation. First, if a specific target rate-limits one subnet (HTTP 429) while accepting neighbors, Scrapy puts only that offending IP into a 10-minute exponential cooldown instead of waiting for random chance. Second, Webshare's REST API v2 exposes automated proxy replacement and validation status fields (valid: true), enabling background daemon tasks to refresh the local ring automatically whenever a scheduled replacement swaps out degraded endpoints.

Comparing Webshare Rotation Topologies in Scrapy and Selenium Pipelines
Rotation TopologyEndpoint PatternBest Webshare Tier FitScrapy / Selenium AdvantageOperational Caveat
Backbone Auto-Rotateuser-rotate:[email protected]:80Rotating Residential ($3.50/GB) & DatacenterZero local pool state; fresh IP per request automaticallyBreaks multi-step carts/auth unless switched to sticky session tags
Backbone Sticky Geouser-us-s01:[email protected]:80Rotating Residential (195+ Countries)Locks state/city/ASN exit for multi-page Selenium/Scrapy flowsPer-GB metering requires blocking heavy JS/images/video assets
REST API v2 Direct PoolGET /api/v2/proxy/list/ (Token Auth)Datacenter ($2.99/100 IPs) & Static ISP ($6/20 IPs)Per-IP quarantine, latency ranking, and automated IP replacementRequires periodic background refresh (every 15–30 min) for fresh list
IP Whitelist (sourceip)ip:port (No Username / Password)All Paid & Free 10 Proxies TiersUnlocks raw Chromium --proxy-server=socks5:// without auth failuresRequires static outbound NAT IPv4 on your scraping host/VPS

Engineering Scrapy DownloaderMiddlewares & Solving Selenium ChromeDriver Auth Traps

Implementing proxy rotation cleanly in Scrapy starts by registering a custom DownloaderMiddleware ahead of HttpProxyMiddleware (for example, priority 350 vs. Scrapy's default 750) alongside explicit retry configuration. Inside process_request(self, request, spider), the middleware assigns request.meta['proxy'] = 'http://p.webshare.io:80' (or selects the lowest-latency healthy IP from the REST API v2 ring) and sets the base64-encoded Proxy-Authorization header explicitly on request.headers[b'Proxy-Authorization']. Never bake inline credentials exclusively into URLs if your pipeline traverses redirects that strip URL userinfo; writing the encoded Basic header directly guarantees consistent authentication across HTTP 301/302 hops.

Equally vital is wiring process_response and process_exception to cooperate with Scrapy's RetryMiddleware rather than fighting it. Add 403, 407, 429, 502, 503, and 504 to RETRY_HTTP_CODES in settings.py, set RETRY_TIMES = 4, and configure your middleware to assign a fresh sticky session suffix or swap to a non-quarantined Datacenter/ISP IP whenever request.meta.get('retry_times', 0) increments. Note that Scrapy's built-in twisted HTTP client uses standard Python OpenSSL TLS signatures; if target domains enforce JA3/JA4 checks and return 403 even on clean Webshare Residential or Static ISP IPs, plug scrapy-impersonate or curl_cffi inside a custom download handler so TLS ClientHello frames match modern Chrome.

Selenium ChromeDriver requires surgical proxy engineering because Chromium refuses inline user:pass authentication inside --proxy-server=http://user:pass@host:port and throws ERR_NO_SUPPORTED_PROXIES on authenticated socks5:// strings. The cleanest zero-hack solution in production is Webshare IP Whitelisting (sourceip): authorize your scraping cluster's static egress IPv4 in the Webshare dashboard or via REST API v2, then launch ChromeDriver with a clean credential-free flag such as --proxy-server=socks5://ip:port or --proxy-server=http://p.webshare.io:80. When dynamic CI/CD runners or local laptops lack a static outbound IP, avoid brittle Manifest V2 webRequest extensions (deprecated in modern Chrome) and instead spin up a tiny local loopback HTTP forwarder (like pproxy or mitmproxy bound to 127.0.0.1:8888) that handles Webshare upstream HTTP/SOCKS5 authentication transparently while ChromeDriver points cleanly at --proxy-server=http://127.0.0.1:8888. Remember also that for headless Chromium workflows built from scratch, Playwright handles HTTP proxy credentials natively via browser.new_context(proxy=...) without loopback bridges.

  • Selenium WebRTC Protection: Always inject options.add_argument('--webrtc-ip-handling-policy=disable_non_proxied_udp') and '--force-webrtc-ip-handling-policy' into ChromeOptions so WebRTC STUN UDP packets cannot reveal your underlying cloud host IP.
  • Selenium DNS Safety: When routing ChromeDriver through a local SOCKS5 bridge, append --host-resolver-rules='MAP * ~NOTFOUND , EXCLUDE 127.0.0.1' so Chromium delegates all hostname lookups across the tunnel instead of leaking DNS queries to your host VPC.
  • Scrapy SOCKS5 Support: Standard Scrapy uses Twisted's HTTP proxy handler natively (`http://`); to speak SOCKS5 (`socks5h://`) in Scrapy, install `txsocksx` or `scrapy-socks5` / `curl_cffi` download handlers, or use `http://p.webshare.io:80` for zero extra Twisted dependencies.
  • Docker Memory Guards for Selenium: Always pass --no-sandbox, --disable-dev-shm-usage, and --headless=new when scaling Selenium containers alongside Scrapy workers so shared /dev/shm exhaustion does not crash tab processes.
Why Local Forwarders Beat Chrome Auth Extensions in 2026

Legacy selenium-wire setups and Manifest V2 proxy-auth zip extensions frequently break under Chrome 125+ Manifest V3 enforcement and inject noticeable TLS/DOM overhead. Using Webshare IP Whitelisting (sourceip) on static servers—or a lightweight 20-line asyncio/pproxy loopback bridge on dynamic IPs—keeps Chromium completely stock while supporting both HTTP and SOCKS5 upstream auth.

Bandwidth Cost Math & Concurrency Economics Across Webshare Tiers

Choosing between Datacenter, Static Residential ISP, and Rotating Residential tiers for Scrapy and Selenium determines whether a 10-million-page monthly crawl costs $15 or $4,200. Because Scrapy downloads only raw HTML, XML sitemaps, or JSON API payloads (typically 35 KB to 120 KB per response without executing CSS, fonts, images, or video streams), 10,000,000 Scrapy fetches average 550 GB to 1.1 TB of total traffic. On Webshare Bulk Datacenter plans (starting at $2.99/mo for 100 shared IPs, dropping down to $0.0179/IP in volume with scaled TB bandwidth allocations on a 100+ Gbps backbone), that 1 TB crawl runs smoothly for a small fraction of per-GB residential rates.

When targets block hosting ASNs—for instance, Cloudflare-protected retail catalogs or B2B directories—upgrading Scrapy to Webshare Static Residential ISP proxies ($6.00/mo for 20 IPs, ~$0.23–$0.30/IP, hosted on real AT&T, Sprint, and Cox consumer ASNs with up to 1 Gbps port speed and unlimited Fair Usage Policy bandwidth) delivers a massive financial advantage over metered residential pools. Even if your Scrapy workers pull 800 GB/mo of product HTML across 40 to 100 Static ISP addresses, your monthly proxy spend stays locked at flat per-IP pricing ($12 to $30/mo) instead of escalating linearly at $3.50/GB ($2,800) or $6.00–$8.40/GB ($4,800–$6,720) on Oxylabs or Bright Data.

Reserve Webshare Rotating Residential ($3.50/GB, 80M+ consumer IPs across 195+ countries) specifically for the narrow slice of endpoints that enforce both residential ASN reputation AND strict per-IP hourly request caps (such as localized Google SERPs or Amazon Buy Box checks), and keep Selenium ChromeDriver asset-blocked via Chrome DevTools Protocol (Network.setBlockedURLs) whenever running over metered GB plans.

Monthly Cost Math for 2,000,000 Pages: Scrapy vs. Selenium Across Webshare Tiers (2026)
Framework & Proxy TierAvg Bytes / PageTotal Monthly TrafficThroughput / ContainerEstimated Monthly Webshare Spend
Scrapy + Datacenter (100–500 IPs)55 KB (HTML/JSON)110 GB250–600 req/sec$2.99 to ~$12 / mo (Shared/Bulk DC)
Scrapy + Private / Dedicated DC55 KB (HTML/JSON)110 GB250–600 req/secZero neighbor bleed · Flat IP tier
Scrapy + Static Residential ISP65 KB (HTML)130 GB80–200 req/sec$6.00/20 IPs to ~$15/50 IPs (Unlimited FUP)
Scrapy (curl_cffi) + Rotating Residential65 KB (HTML)130 GB60–150 req/sec~$455 / mo ($3.50/GB entry rate)
Selenium Unblocked + Rotating Residential3.2 MB (Full DOM)6,400 GB2–6 req/sec~$22,400 / mo (Unoptimized anti-pattern)
Deploy This Architecture Risk-Free

Test Live Webshare Endpoints With 10 Free Proxies

Every Webshare account starts with 10 shared proxies and 1 GB monthly bandwidth—no credit card required. Upgrade cleanly only after latency and success rates match your benchmark.

Claim 10 Free Webshare IPs → View 5x13 Matrix

Failure Triage Matrix: Fixing Common Scrapy & Selenium Proxy Faults

Distributed crawlers fail in predictable patterns when proxy pools, Twisted connection pools, and browser drivers drift out of sync. Below is a production triage matrix indexing the exact log signatures engineers observe in Scrapy and Selenium runs alongside their root network causes and verified fixes.

Scrapy & Selenium Proxy Failure Triage Matrix
Observed Failure / Log TraceRoot Network / Client CauseHow to ConfirmProduction Remediation
Scrapy TunnelError / 407 Proxy Authentication RequiredIncorrect Base64 Proxy-Authorization header or stale password after credential resetTest exact proxy string with curl -x http://... https://ipv4.webshare.io/Refresh credentials via REST API v2 (/api/v2/proxy/list/) and encode user:pass cleanly in process_request
Selenium opens Chrome but hangs or shows ERR_NO_SUPPORTED_PROXIESPassed socks5://user:pass@host:port or inline credentials to --proxy-serverCheck chrome://net-export logs or launch traceWhitelist server IP in Webshare (sourceip) so --proxy-server takes no password, or bridge via 127.0.0.1 HTTP forwarder
High 403 block rate on clean Webshare ISP / Residential IPs in ScrapyTwisted default TLS cipher suite / Python User-Agent mismatch flagged by WAF JA4Same proxy IP returns 200 OK in curl_cffi or ChromiumEnable scrapy-impersonate / curl_cffi download handler matching Chrome TLS & Sec-Ch-Ua headers
Target ties separate Scrapy requests together despite IP rotationGlobal Scrapy COOKIES_ENABLED=True replays old session cookies onto new IPsInspect Request Cookie headers across consecutive proxy hopsSet COOKIES_ENABLED=False for stateless crawls or key meta['cookiejar'] to sticky proxy ID
Selenium target flags real VPC IP alongside Webshare exit IPWebRTC UDP STUN requests bypassed Chromium's HTTP/SOCKS5 proxy tunnelTest driver against WebRTC leak detector pageAdd --webrtc-ip-handling-policy=disable_non_proxied_udp and --force-webrtc-ip-handling-policy
Twisted TCPTimedOutError spikes at >300 concurrent Scrapy requestsEphemeral source port / conntrack exhaustion or undersized proxy pool concurrencyRun ss -tan state time-wait | wc -l on hostIncrease Webshare Datacenter IP count, tune DOWNLOAD_TIMEOUT=15, and enable TCP socket reuse carefully

Production Scrapy Middleware & Leak-Hardened Selenium Launcher

To eliminate hardcoded proxy lists and brittle manual restarts, combine a REST API v2 loader with deterministic fallback into Webshare's p.webshare.io gateway. The Scrapy DownloaderMiddleware below periodically pulls active proxies from https://proxy.webshare.io/api/v2/proxy/list/, tracks consecutive 403/429 error counters per endpoint so struggling IPs step aside into a temporary quarantine window, and falls back smoothly to p.webshare.io:80 with -rotate if all direct nodes are temporarily cooling down.

Pair this spider infrastructure with the hardened Selenium ChromeDriver builder for endpoints that strictly mandate legacy WebDriver compatibility:

  1. Set WEBSHARE_API_KEY, WEBSHARE_PROXY_USER, and WEBSHARE_PROXY_PASS in your deployment environment variables.
  2. Enable WebshareRotationMiddleware in Scrapy settings.py at downloader middleware priority 350 while disabling or coordinating default RetryMiddleware codes (403, 407, 429, 502, 503).
  3. Set DOWNLOAD_TIMEOUT = 20, AUTOTHROTTLE_ENABLED = True, and partition COOKIES_ENABLED = False (or per-session cookiejar) so rotated IPs never carry stale session tokens.
  4. For Selenium ChromeDriver nodes, register the worker's outbound IPv4 in Webshare's IP Whitelist (sourceip) or bind a local authenticated forwarder to 127.0.0.1:8888 so Chromium starts cleanly without auth popups.
  5. Attach --webrtc-ip-handling-policy=disable_non_proxied_udp, --force-webrtc-ip-handling-policy, and --host-resolver-rules for SOCKS5 bridges before opening any target URL.
Scrapy WebshareRotationMiddleware (REST API v2 + Quarantine + p.webshare.io Fallback) & Hardened Selenium
import base64
import os
import time
import urllib.request
import json
from collections import defaultdict
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

class WebshareRotationMiddleware:
    """Scrapy DownloaderMiddleware combining REST API v2 pool ring + p.webshare.io fallback."""

    def __init__(self, api_key: str, gw_user: str, gw_pass: str):
        self.api_key = api_key
        self.gw_user = gw_user
        self.gw_pass = gw_pass
        self.pool: list[dict] = []
        self.cooldown_until: dict[str, float] = defaultdict(float)
        self.last_refresh = 0.0
        self._refresh_pool()

    @classmethod
    def from_crawler(cls, crawler):
        return cls(
            api_key=os.environ["WEBSHARE_API_KEY"],
            gw_user=os.environ["WEBSHARE_PROXY_USER"],
            gw_pass=os.environ["WEBSHARE_PROXY_PASS"],
        )

    def _refresh_pool(self) -> None:
        if time.time() - self.last_refresh < 900 and self.pool:
            return
        req = urllib.request.Request(
            "https://proxy.webshare.io/api/v2/proxy/list/?mode=direct&page=1&page_size=100",
            headers={"Authorization": f"Token {self.api_key}"},
        )
        with urllib.request.urlopen(req, timeout=15) as resp:
            data = json.loads(resp.read().decode("utf-8"))
        self.pool = [p for p in data.get("results", []) if p.get("valid")]
        self.last_refresh = time.time()

    def _pick_proxy(self, attempt: int) -> tuple[str, str]:
        self._refresh_pool()
        now = time.time()
        healthy = [p for p in self.pool if self.cooldown_until[p["proxy_address"]] < now]
        if healthy and attempt < 2:
            node = healthy[attempt % len(healthy)]
            addr = f"http://{node['proxy_address']}:{node['port']}"
            creds = f"{node['username']}:{node['password']}"
            return addr, creds
        # Escalate on retries or empty ring to Webshare -rotate backbone gateway
        return "http://p.webshare.io:80", f"{self.gw_user}-rotate:{self.gw_pass}"

    def process_request(self, request, spider):
        attempt = request.meta.get("retry_times", 0)
        proxy_url, creds = self._pick_proxy(attempt)
        request.meta["proxy"] = proxy_url
        request.meta["_ws_proxy_host"] = proxy_url
        token = base64.b64encode(creds.encode("utf-8")).decode("ascii")
        request.headers[b"Proxy-Authorization"] = f"Basic {token}".encode("ascii")

    def process_response(self, request, response, spider):
        if response.status in (403, 429, 503):
            host = request.meta.get("_ws_proxy_host", "").replace("http://", "").split(":")[0]
            if host and "p.webshare.io" not in host:
                self.cooldown_until[host] = time.time() + 300
        return response

def build_hardened_selenium_driver(whitelisted_socks5: str) -> webdriver.Chrome:
    """Launch ChromeDriver against a Webshare sourceip-whitelisted SOCKS5 endpoint (no inline auth)."""
    opts = Options()
    opts.add_argument("--headless=new")
    opts.add_argument("--no-sandbox")
    opts.add_argument("--disable-dev-shm-usage")
    opts.add_argument(f"--proxy-server=socks5://{whitelisted_socks5}")
    opts.add_argument("--webrtc-ip-handling-policy=disable_non_proxied_udp")
    opts.add_argument("--force-webrtc-ip-handling-policy")
    opts.add_argument("--disable-features=WebRtcHideLocalIpsWithMdns")
    opts.add_argument("--host-resolver-rules=MAP * ~NOTFOUND , EXCLUDE 127.0.0.1")
    return webdriver.Chrome(options=opts)

Crawl Politeness, AutoThrottle Discipline & Legal Guardrails

Scrapy's raw Twisted concurrency can easily saturate a small merchant or directory origin server if configured with unguarded CONCURRENT_REQUESTS_PER_DOMAIN = 128 and zero delay. Even when routing through 100 or 1,000 Webshare Datacenter or Residential exit nodes so each individual IP appears quiet, the origin application backend still receives the combined aggregate request spike. Enabling AUTOTHROTTLE_ENABLED = True with a realistic AUTOTHROTTLE_TARGET_CONCURRENCY (typically 2.0 to 8.0 per domain) scales request cadence automatically based on origin response latency, preventing involuntary denial-of-service behavior and keeping block rates near zero.

Every Scrapy and Selenium pipeline must respect lawful access boundaries, platform Terms of Service where applicable, and Webshare's Acceptable Use Policy. Limit automated collection strictly to public non-authenticated product pages, search listings, open documentation, and authorized QA endpoints. Enable ROBOTSTXT_OBEY = True when auditing standard compliant domains, honor HTTP Retry-After directives, and scrub any accidental personal contact information before indexing crawled datasets.

Finally, harden secret management across container orchestration (Docker Compose, Kubernetes, Railway, or Coolify). Inject WEBSHARE_API_KEY and gateway credentials via runtime environment secrets rather than checking scrapy.cfg or proxy text files into Git repositories, and configure Webshare IP Whitelisting (sourceip) locked exclusively to your production NAT gateway so leaked environment files alone cannot authorize external traffic.

  • Set CONCURRENT_REQUESTS_PER_DOMAIN = 8 and AUTOTHROTTLE_ENABLED = True in Scrapy to match origin throughput gracefully.
  • Never store proxy.txt or hardcoded REST API tokens inside source control; pull dynamically at container boot via REST API v2.
  • Quarantine degraded proxies locally for 5–15 minutes rather than flooding failing endpoints with aggressive immediate retries.
  • Avoid rotating IP mid-session on stateful Selenium forms—pair sticky session IDs with isolated browser profiles and clean teardown.

Frequently Asked Questions

How do I use Webshare SOCKS5 proxies in Scrapy without connection errors?
Scrapy's built-in HttpProxyMiddleware speaks HTTP CONNECT tunnels natively (such as http://p.webshare.io:80), rather than raw SOCKS5. If your pipeline requires SOCKS5 transport (`:1080`), either install a SOCKS-capable Scrapy download handler (such as `scrapy-socks5` or a `curl_cffi` async download handler supporting `socks5h://`), or route Scrapy over `http://p.webshare.io:80` which accesses the exact same Webshare Datacenter, Static ISP, and 80M+ Residential pools with zero extra protocol dependencies.
Why does Selenium ChromeDriver ignore my Webshare username and password in --proxy-server?
Chromium explicitly prohibits passing inline `username:password@` credentials inside `--proxy-server=http://` or `--proxy-server=socks5://` flags for security reasons and lacks native headless support for handling HTTP 407 auth dialogs via pure CLI flags. The cleanest production solutions are: (1) enable Webshare IP Whitelisting (`sourceip`) so Chromium connects without a username or password, (2) run a local loopback HTTP proxy on `127.0.0.1` that injects upstream Webshare credentials, or (3) switch to Playwright where HTTP proxy `{ server, username, password }` authentication is natively supported per BrowserContext.
Should I use p.webshare.io -rotate or fetch individual IPs via REST API v2 in Scrapy?
Use REST API v2 (`https://proxy.webshare.io/api/v2/proxy/list/`) when running Datacenter ($2.99/100 IPs) or Static Residential ISP ($6.00/20 IPs) pools so your Scrapy DownloaderMiddleware can track latency, isolate 429-throttled IPs in a 5-minute cooldown ring, and manage sticky cookie jars cleanly. Use `p.webshare.io:80` with `-rotate` or country/session suffixes when tapping into Webshare's 80M+ Rotating Residential pool ($3.50/GB) so rotation happens effortlessly across the global residential backbone.
How do I prevent Scrapy cookie jars from ruining Webshare IP rotation?
By default, Scrapy maintains a single shared cookie jar per spider (`COOKIES_ENABLED = True`). If request #1 acquires a WAF tracking cookie on Exit IP A and request #2 sends that exact cookie over Exit IP B, anti-bot systems immediately detect IP hopping and issue HTTP 403 bans. Fix this either by setting `COOKIES_ENABLED = False` for stateless crawling or assigning `request.meta['cookiejar']` to your sticky proxy session ID.
Can I combine Scrapy speed with Webshare Static Residential ISP unlimited bandwidth?
Yes—that pairing is one of the highest-ROI architectures in production scraping. Webshare Static Residential ISP proxies start at $6.00/mo for 20 IPs (~$0.23–$0.30/IP) on genuine AT&T, Sprint, and Cox consumer ASNs with up to 1 Gbps port speed and unlimited Fair Usage Policy traffic. Running Scrapy at 50–150 concurrent fetches over Static ISP avoids per-GB residential charges entirely on moderately protected sites.
Does Selenium leak my server's real IP through WebRTC even with Webshare SOCKS5 enabled?
Yes, unless explicitly mitigated. By default, WebRTC attempts UDP STUN discovery outside TCP proxy tunnels and reveals your cloud VM's public or local network IP to browser fingerprinting scripts. Always include `--webrtc-ip-handling-policy=disable_non_proxied_udp` and `--force-webrtc-ip-handling-policy` in your ChromeOptions arguments.
WebshareIPS Proxy Engineering Desk

Benchmarked and maintained against Webshare 2026 public pricing schedules, REST API v2 documentation, and multi-provider TLS/HTTP concurrency checks. Read our testing policy.

Related Benchmarks & Guides

Also Audited by Our Engineering Desk