Skip to main content
The Center's Directory
Integration guides · Tools and proxy software

Use proxies with Python HTTP clients and Scrapy

Covers configuration sources, authentication, and export validation for Requests, HTTPX, aiohttp, urllib3, curl_cffi, and web parser libraries.

Maintained by the ZZHTTP engineering teamUpdated October 7, 2026

When accessing the Python tool, distinguish between the library responsible for web requests and the library responsible for parsing pages only. The difference between dynamic and static ZZHTTP is that the connection field source and the request library configuration can be shared.

Step 1: Get ZZHTTP Proxy Information

  • ** Rotating residential proxies **: Go to "Rotating Residential → Proxy setup → Endpoint generator", get us.zzhttp.com Port 7878(a) the full generated agent username and password for the corresponding sub-account. The protocol is selected by tool, HTTP or SOCKS5 TCP. First, confirm the real name, interests, shared traffic, and sub-account status.
  • Static residential proxies: Go to "Static residential proxies Network → IP Management" and copy the actual IP, port and independent agent accounts of delivered, available and unexpired instances. Static purchases do not require identity verification and do not use dynamic gateways, sub-accounts or customer IP allowlists.

See the detailed steps for access.Username & password and First connection of static residential. The proxy password is not the console login password.

Step Two: Select the tool port

ToolsConfiguration inputPoints of Use
RequestsRequest or Session proxiesBoth HTTP and HTTPS targets can use HTTP proxy URLs, see Existing Python examples
HTTPXClient proxyCheck the parameters by install version, see HTTPX examples
aiohttpRequested proxy and proxy_authEndpoints are separate from BasicAuth, see aiohttp example
urllib3ProxyManager and proxy_headersUse proxy authentication headers, not send authentication headers to target sites
curl_cffiSession or request proxy optionsConfigure HTTP proxy and authentication according to the current version of the library, not assume that the proxy is enabled because of the presence of the fingerprint option
ScrapyRequest meta['proxy']- I'm not sure.(a) Certification is handled by the corresponding intermediary. Checks on a request-by-request basis, not considering global variables as configurations in effect
Beautiful Soup, PyQuery, lxmlThe request library with the configured proxy first gets the body and then passes it to the parserThe parser does not automatically inherit other process agents. If you call the self-connection function, check its network entry separately

Prefer separate authentication fields when the library provides them. When embedding credentials in a proxy URL, URL-encode the username and password individually so special characters such as @ and : are interpreted correctly. Keep the proxy URL scheme set to http:// when connecting to HTTPS destinations through an HTTP proxy.

Step 3: Save and run the minimum request

  1. Reads host, port, username, password from environment variables or private running configuration, and fills in the corresponding parameters for the selected library.
  2. Set a reasonable timeout, verify with a single request first, and avoid using a large batch of capture tasks as a first test.
  3. Checks whether the library reads the system proxy variable, bypasses the list, or uses another Session to ensure that the actual request uses this configuration.
  4. The response is then passed to the parser, which checks the status code and content type, and does not parse the error page into normal data.

Step 4: Verification and clearance

Request access from the same Client / Session / Scrapy https://ipinfo.io/json The targets were then visited and tested. The results of the analysis cannot in themselves prove the validity of the agent.

  • 407: Dynamic checks completed to generate user names, sub-accounts and rights. Static checks instance-independent credentials and validity.
  • Parameter error: Check the library version, interface changes to libraries such as HTTPX cannot be used with other library parameters.
  • TLS Failed: Checks certificate trust with target site, not masking issue by closing certificate validation.
  • Parsed as empty: Check the HTTP status and response body first, then check the selector, a successful proxy connection does not guarantee page structure.
  • Exports repeatedly change: dynamic tasks require stable sessions Sticky sessions; Static without dynamic session parameters.

For current library options, see the Requests Proxy Documentation, HTTPX Proxy Documentation, aiohttp proxy support, urllib3 Agent Description, Scrapy Agent Middleware and curl_cffi proxy example.

Did this answer your question?

Feedback is used only to improve the public documentation and does not submit accounts or request information.