# ReadTheDocsLoader

> **Class** in `langchain_community`

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

Load `ReadTheDocs` documentation directory.

## Signature

```python
ReadTheDocsLoader(
    self,
    path: Union[str, Path],
    encoding: Optional[str] = None,
    errors: Optional[str] = None,
    custom_html_tag: Optional[Tuple[str, dict]] = None,
    patterns: Sequence[str] = ('*.htm', '*.html'),
    exclude_links_ratio: float = 1.0,
    **kwargs: Optional[Any] = {},
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `path` | `Union[str, Path]` | Yes | The location of pulled readthedocs folder. |
| `encoding` | `Optional[str]` | No | The encoding with which to open the documents. (default: `None`) |
| `errors` | `Optional[str]` | No | Specify how encoding and decoding errors are to be handled—this cannot be used in binary mode. (default: `None`) |
| `custom_html_tag` | `Optional[Tuple[str, dict]]` | No | Optional custom html tag to retrieve the content from files. (default: `None`) |
| `patterns` | `Sequence[str]` | No | The file patterns to load, passed to `glob.rglob`. (default: `('*.htm', '*.html')`) |
| `exclude_links_ratio` | `float` | No | The ratio of links:content to exclude pages from. This is to reduce the frequency at which index pages make their way into retrieved results. Recommended: 0.5 (default: `1.0`) |
| `kwargs` | `Optional[Any]` | No | named arguments passed to `bs4.BeautifulSoup`. (default: `{}`) |

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    path: Union[str, Path],
    encoding: Optional[str] = None,
    errors: Optional[str] = None,
    custom_html_tag: Optional[Tuple[str, dict]] = None,
    patterns: Sequence[str] = ('*.htm', '*.html'),
    exclude_links_ratio: float = 1.0,
    **kwargs: Optional[Any] = {},
)
```

| Name | Type |
|------|------|
| `path` | `Union[str, Path]` |
| `encoding` | `Optional[str]` |
| `errors` | `Optional[str]` |
| `custom_html_tag` | `Optional[Tuple[str, dict]]` |
| `patterns` | `Sequence[str]` |
| `exclude_links_ratio` | `float` |


## Properties

- `file_path`
- `encoding`
- `errors`
- `custom_html_tag`
- `patterns`
- `bs_kwargs`
- `exclude_links_ratio`

## Methods

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

---

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