Source code for langchain_community.document_loaders.college_confidential
from typing import List
from langchain_core.documents import Document
from langchain_community.document_loaders.web_base import WebBaseLoader
[docs]
class CollegeConfidentialLoader(WebBaseLoader):
"""Load `College Confidential` webpages."""
[docs]
def load(self) -> List[Document]:
"""Load webpages as Documents."""
soup = self.scrape()
text = soup.select_one("main[class='skin-handler']").text
metadata = {"source": self.web_path}
return [Document(page_content=text, metadata=metadata)]