Source code for langchain_community.document_loaders.imsdb

from typing import List

from langchain_core.documents import Document

from langchain_community.document_loaders.web_base import WebBaseLoader


[docs]class IMSDbLoader(WebBaseLoader): """加载`IMSDb`网页。"""
[docs] def load(self) -> List[Document]: """加载网页。""" soup = self.scrape() text = soup.select_one("td[class='scrtext']").text metadata = {"source": self.web_path} return [Document(page_content=text, metadata=metadata)]