GuidesIntegrations
Playwright
Run real browsers through RiftIP — per browser, or per context for many identities at once.
Playwright takes a proxy server and credentials separately. Put options in the username as usual.
import { chromium } from "playwright";
const browser = await chromium.launch({
proxy: {
server: "http://gate.riftip.com:7777",
username: `${process.env.RIFTIP_USER}-net-residential-country-us`,
password: process.env.RIFTIP_PASS,
},
});
const page = await browser.newPage();
await page.goto("https://ip.riftip.com");
console.log(await page.textContent("body"));
await browser.close();from playwright.sync_api import sync_playwright
import os
with sync_playwright() as p:
browser = p.chromium.launch(proxy={
"server": "http://gate.riftip.com:7777",
"username": f"{os.environ['RIFTIP_USER']}-net-residential-country-us",
"password": os.environ["RIFTIP_PASS"],
})
page = browser.new_page()
page.goto("https://ip.riftip.com")
print(page.text_content("body"))
browser.close()#One identity per context
Give each browser context its own sticky session to run many independent identities in one browser:
JavaScript
const context = await browser.newContext({
proxy: {
server: "http://gate.riftip.com:7777",
username: `${process.env.RIFTIP_USER}-session-profile_7-ttl-2h`,
password: process.env.RIFTIP_PASS,
},
});Tip
Block images, fonts and media you don't need with page.route() — it can cut residential bandwidth by more than half on heavy pages.