Skip to main content

ReadTheDocs Documentation

Read the Docs是一个开源的免费软件文档托管平台。它使用Sphinx文档生成器生成文档。

本笔记本介绍了如何从作为Read-The-Docs构建的一部分生成的HTML中加载内容。

有关实际示例,请参见这里

假设HTML已经被抓取到一个文件夹中。可以通过取消注释并运行以下命令来完成此操作

#!pip install beautifulsoup4
#!wget -r -A.html -P rtdocs https://python.langchain.com/en/latest/
from langchain.document_loaders import ReadTheDocsLoader
loader = ReadTheDocsLoader("rtdocs", features="html.parser")
docs = loader.load()