# MHTMLLoader

> **Class** in `langchain_community`

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

Parse `MHTML` files with `BeautifulSoup`.

## Signature

```python
MHTMLLoader(
    self,
    file_path: Union[str, Path],
    open_encoding: Union[str, None] = None,
    bs_kwargs: Union[dict, None] = None,
    get_text_separator: str = '',
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `file_path` | `Union[str, Path]` | Yes | Path to file to load. |
| `open_encoding` | `Union[str, None]` | No | The encoding to use when opening the file. (default: `None`) |
| `bs_kwargs` | `Union[dict, None]` | No | Any kwargs to pass to the BeautifulSoup object. (default: `None`) |
| `get_text_separator` | `str` | No | The separator to use when getting the text from the soup. (default: `''`) |

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    file_path: Union[str, Path],
    open_encoding: Union[str, None] = None,
    bs_kwargs: Union[dict, None] = None,
    get_text_separator: str = '',
) -> None
```

| Name | Type |
|------|------|
| `file_path` | `Union[str, Path]` |
| `open_encoding` | `Union[str, None]` |
| `bs_kwargs` | `Union[dict, None]` |
| `get_text_separator` | `str` |


## Properties

- `file_path`
- `open_encoding`
- `bs_kwargs`
- `get_text_separator`

## Methods

- [`lazy_load()`](https://reference.langchain.com/python/langchain-community/document_loaders/mhtml/MHTMLLoader/lazy_load)

---

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