# Automation Frameworks

Integration guides for Selenium, Puppeteer, Playwright, Scrapy, and other automation and scraping frameworks. Replace `USERNAME` and `PASSWORD` with your credentials and every example runs as-is.

## Scrapy

Enable the proxy middleware in `settings.py`, or set the proxy per request:

```python
# Option 1: global (settings.py)
HTTPPROXY_ENABLED = True

# Set the proxy for each request in your Spider
def start_requests(self):
    proxy = "http://USERNAME-pool-flow-region-US:PASSWORD@proxy.eproxies.net:23333"
    for url in self.start_urls:
        yield scrapy.Request(url, meta={"proxy": proxy})
```

Per-request rotation is the default behavior and fits Scrapy's concurrency model naturally; add a `sid` to the username when you need session-pinned IPs.

## Selenium (Python)

Chrome's command-line flags do not support authenticated proxies, so use `selenium-wire` to handle the credentials:

```python
# pip install selenium-wire
from seleniumwire import webdriver

options = {
    "proxy": {
        "http": "http://USERNAME-pool-flow-region-US:PASSWORD@proxy.eproxies.net:23333",
        "https": "http://USERNAME-pool-flow-region-US:PASSWORD@proxy.eproxies.net:23333",
    }
}

driver = webdriver.Chrome(seleniumwire_options=options)
driver.get("https://ipinfo.io")
print(driver.page_source)
driver.quit()
```

Alternatively, switch to [whitelist mode](https://www.eproxies.io/docs/usage/api-extraction): extract auth-free `IP:port` proxies and use the native `--proxy-server` flag directly.

## Puppeteer (Node.js)

```javascript
const puppeteer = require("puppeteer");

(async () => {
  const browser = await puppeteer.launch({
    args: ["--proxy-server=http://proxy.eproxies.net:23333"],
  });
  const page = await browser.newPage();
  await page.authenticate({
    username: "USERNAME-pool-flow-region-US",
    password: "PASSWORD",
  });
  await page.goto("https://ipinfo.io/json");
  console.log(await page.evaluate(() => document.body.innerText));
  await browser.close();
})();
```

## Playwright (Node.js / Python)

```javascript
// Node.js
const { chromium } = require("playwright");

(async () => {
  const browser = await chromium.launch({
    proxy: {
      server: "http://proxy.eproxies.net:23333",
      username: "USERNAME-pool-flow-region-US",
      password: "PASSWORD",
    },
  });
  const page = await browser.newPage();
  await page.goto("https://ipinfo.io/json");
  console.log(await page.textContent("body"));
  await browser.close();
})();
```

```python
# Python
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(proxy={
        "server": "http://proxy.eproxies.net:23333",
        "username": "USERNAME-pool-flow-region-US",
        "password": "PASSWORD",
    })
    page = browser.new_page()
    page.goto("https://ipinfo.io/json")
    print(page.text_content("body"))
    browser.close()
```

## AI agents / LLM data pipelines

When driving browsers or collecting data with LLMs (LangChain tools, Browser Use, custom agents, etc.), pass the proxy configuration from any of the frameworks above. Key points:

* Give each parallel agent its own `sid` so sessions never interfere ([multi-session example](https://www.eproxies.io/docs/usage/session-control)).
* Have agents request `https://ipinfo.io` at the start of a task to verify the exit IP before doing real work.
* Full parameter syntax on one page: [Agent Cheat Sheet](https://www.eproxies.io/docs/agent-reference).

## Scraping tools

Official setup tutorials for GUI scraping tools: [Octoparse](https://www.eproxies.io/integrations/octoparse) · [Scrapy](https://www.eproxies.io/integrations/scrapy) · [ScrapeStorm](https://www.eproxies.io/integrations/scrapestorm) · [SellerSprite](https://www.eproxies.io/integrations/sellersprite) · [Helium 10](https://www.eproxies.io/integrations/helium10)
