#Python

Proxies with requests, httpx, aiohttp and Scrapy.

10 articles

Setup guides

Selenium Proxy With Username and Password (Chrome): What Works in 2026

Chrome under Selenium ignores a proxy login in --proxy-server and has no SOCKS5 auth. What each attempt does, and a local forwarder that works.

5 min read · #python#authentication

Fixes

aiohttp Proxy Errors: ClientHttpProxyError 407, SOCKS5 and trust_env

aiohttp's ClientHttpProxyError explained, why its message leaks your proxy password, socks5:// without aiohttp-socks, and rotation.

6 min read · #python#errors

Fixes

httpx: unexpected keyword argument 'proxies' — Fix Without Downgrading

httpx 0.28 removed proxies=. What replaces it (proxy= and mounts=), the OpenAI SDK case, SOCKS5 and environment proxies.

5 min read · #python#errors

Fixes

Scrapy: Could not open CONNECT tunnel with proxy (407, 403, SOCKS5)

What the status in Scrapy's TunnelError means, why socks5:// only times out, and a proxy middleware that works. Every case reproduced.

7 min read · #scrapy#python

Fixes

SSL: WRONG_VERSION_NUMBER With a Proxy: the Fix for Python, Go, Node and curl

The proxy URL says https:// and the proxy speaks plain HTTP. The same mistake and its error message in requests, httpx, Go, Node and curl.

6 min read · #python#go

Fixes

Tunnel connection failed: 407 in Python requests (and 403, 465)

The status is the proxy's answer, not the website's. Five causes of 407 we reproduced, and what 403 and 465 mean instead.

7 min read · #python#errors

Fixes

ProxyError: Cannot Connect to Proxy in Python requests: Every Cause

The message is a wrapper. How to read the exception inside it, each cause reproduced, and which errors are worth a retry.

7 min read · #python#errors

Fixes

Missing dependencies for SOCKS support: the Fix, and Why You See It Without SOCKS

Install requests[socks], or find the environment variable that asked for SOCKS. Plus socks5 vs socks5h and the errors that come next.

6 min read · #python#socks5

Setup guides

How to Rotate Proxies in Python (and Why Yours May Not Rotate)

requests.Session, httpx.Client and Scrapy reuse one IP through a rotating proxy. What rotates, measured, and code that gets a new IP per request.

7 min read · #python#scrapy

Tutorials

How to Scrape Amazon Product Data in Python (and What a Proxy Changes)

A tested Python scraper for Amazon product pages, what we measured with and without residential proxies, and why the exit country changes the price.

8 min read · #amazon#web-scraping