Integrations · Automation & scraping
Use HProxy with Playwright.
Set an HProxy proxy per browser context in Playwright, no extension needed.
Playwright is Microsoft's modern browser-automation framework, fast, cross-browser, and built with proxy support in the API rather than bolted on.
Playwright can run many isolated browser contexts at once. Give each one its own residential exit and a single script becomes many independent visitors instead of one busy address.
Setting up HProxy in Playwright
- 1.Read your host, port and login from the dashboard.
- 2.Pass a proxy object to launch(), or to newContext() for a different exit per context.
- 3.Playwright handles the authentication handshake itself, so no extra library is required.
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(proxy={
"server": "http://res.hproxy.com:8080",
"username": "user-country-us",
"password": "pass",
})
page = browser.new_page()
page.goto("https://ipinfo.io/json")Worth knowing
Set the proxy on new_context() instead of launch() to give every context a fresh IP from the pool.
The host, port and login shown here are the format; your exact values are on your dashboard, ready to copy.