Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
imsdb.py17 linesDownload Raw Back to document_loaders
1from typing import List2 3from langchain_core.documents import Document4 5from langchain_community.document_loaders.web_base import WebBaseLoader6 7 8class IMSDbLoader(WebBaseLoader):9    """Load `IMSDb` webpages."""10 11    def load(self) -> List[Document]:12        """Load webpage."""13        soup = self.scrape()14        text = soup.select_one("td[class='scrtext']").text15        metadata = {"source": self.web_path}16        return [Document(page_content=text, metadata=metadata)]17 
codekingpro/portable-devtools · Team Ai