# PlaywrightURLLoader

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_loaders/url_playwright/PlaywrightURLLoader)

Load `HTML` pages with `Playwright` and parse with `Unstructured`.

This is useful for loading pages that require javascript to render.

## Signature

```python
PlaywrightURLLoader(
    self,
    urls: List[str],
    continue_on_failure: bool = True,
    headless: bool = True,
    remove_selectors: Optional[List[str]] = None,
    evaluator: Optional[PlaywrightEvaluator] = None,
    proxy: Optional[Dict[str, str]] = None,
    browser_session: Optional[Union[str, os.PathLike[str]]] = None,
    timeout: Optional[int] = 30000,
    wait_until: Optional[str] = 'load',
)
```

## Description

**Example:**

.. code-block:: python

from langchain_community.document_loaders import PlaywrightURLLoader

urls = ["https://api.ipify.org/?format=json",]
proxy={
    "server": "https://xx.xx.xx:15818", # https://<host>:<port>
    "username": "username",
    "password": "password"
}
loader = PlaywrightURLLoader(
    urls=urls,
    proxy=proxy,
    timeout=60000,  # 60 second timeout
    wait_until="domcontentloaded"  # Wait for DOM content to load
)
data = loader.load()

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    urls: List[str],
    continue_on_failure: bool = True,
    headless: bool = True,
    remove_selectors: Optional[List[str]] = None,
    evaluator: Optional[PlaywrightEvaluator] = None,
    proxy: Optional[Dict[str, str]] = None,
    browser_session: Optional[Union[str, os.PathLike[str]]] = None,
    timeout: Optional[int] = 30000,
    wait_until: Optional[str] = 'load',
)
```

| Name | Type |
|------|------|
| `urls` | `List[str]` |
| `continue_on_failure` | `bool` |
| `headless` | `bool` |
| `remove_selectors` | `Optional[List[str]]` |
| `evaluator` | `Optional[PlaywrightEvaluator]` |
| `proxy` | `Optional[Dict[str, str]]` |
| `browser_session` | `Optional[Union[str, os.PathLike[str]]]` |
| `timeout` | `Optional[int]` |
| `wait_until` | `Optional[str]` |


## Properties

- `urls`
- `continue_on_failure`
- `headless`
- `proxy`
- `browser_session`
- `timeout`
- `wait_until`
- `evaluator`

## Methods

- [`lazy_load()`](https://reference.langchain.com/python/langchain-community/document_loaders/url_playwright/PlaywrightURLLoader/lazy_load)
- [`aload()`](https://reference.langchain.com/python/langchain-community/document_loaders/url_playwright/PlaywrightURLLoader/aload)
- [`alazy_load()`](https://reference.langchain.com/python/langchain-community/document_loaders/url_playwright/PlaywrightURLLoader/alazy_load)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/document_loaders/url_playwright.py#L106)