Python Requests
The simplest way to add helodata to a Python scraper.
Install
pip install requests
# For SOCKS5 support:
pip install requests[socks]Residential / Mobile (gateway)
import requests
USER = "helo_s1a2b3c4d5e-type-res-region-us" # change type-res to type-mob for Mobile
PASS = "PASSWORD"
proxy = f"http://{USER}:{PASS}@gate.helodata.io:7777"
r = requests.get(
"https://ipv4.icanhazip.com",
proxies={"http": proxy, "https": proxy},
timeout=30,
)
print(r.text.strip())ISP
SOCKS5 with remote DNS
Crucial: use socks5h:// (with the h) so the proxy resolves DNS — otherwise the local resolver leaks DNS and geo-targeting breaks.
Session (HTTP keep-alive)
Reusing connections across requests is faster, especially for ISP (stable IPs):
Rotating residential sessions
Mint a fresh session-XXX for each batch of N requests:
ISP round-robin
See Client-side rotation for production-quality patterns.
Retries
Use urllib3.Retry for transient errors:
Verify
Common pitfalls
Forgetting
httpskey in proxies dict — Pythonrequestsrequires bothhttpandhttpsentries even when only HTTPS targets are used.socks5://instead ofsocks5h://— DNS leak. Always usesocks5h://for SOCKS5.No timeout — requests can hang forever on a flaky upstream. Always pass
timeout.
Last updated
Was this helpful?