{"version":3,"file":"college_confidential.cjs","names":["CheerioWebBaseLoader","webPath: string","Document"],"sources":["../../../src/document_loaders/web/college_confidential.ts"],"sourcesContent":["import { Document } from \"@langchain/core/documents\";\nimport { CheerioWebBaseLoader } from \"./cheerio.js\";\n\n/**\n * A document loader specifically designed for loading documents from the\n * College Confidential website. It extends the CheerioWebBaseLoader.\n * @example\n * ```typescript\n * const loader = new CollegeConfidentialLoader(\"https:exampleurl.com\");\n * const docs = await loader.load();\n * console.log({ docs });\n * ```\n */\nexport class CollegeConfidentialLoader extends CheerioWebBaseLoader {\n  constructor(webPath: string) {\n    super(webPath);\n  }\n\n  /**\n   * Overrides the base load() method to extract the text content from the\n   * loaded document using a specific selector for the College Confidential\n   * website. It creates a Document instance with the extracted text and\n   * metadata, and returns an array containing the Document instance.\n   * @returns An array containing a Document instance with the extracted text and metadata from the loaded College Confidential web document.\n   */\n  public async load(): Promise<Document[]> {\n    const $ = await this.scrape();\n    const text = $(\"main[class='skin-handler']\").text();\n    const metadata = { source: this.webPath };\n    return [new Document({ pageContent: text, metadata })];\n  }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAaA,IAAa,4BAAb,cAA+CA,0DAAqB;CAClE,YAAYC,SAAiB;EAC3B,MAAM,QAAQ;CACf;;;;;;;;CASD,MAAa,OAA4B;EACvC,MAAM,IAAI,MAAM,KAAK,QAAQ;EAC7B,MAAM,OAAO,EAAE,6BAA6B,CAAC,MAAM;EACnD,MAAM,WAAW,EAAE,QAAQ,KAAK,QAAS;AACzC,SAAO,CAAC,IAAIC,oCAAS;GAAE,aAAa;GAAM;EAAU,EAAE;CACvD;AACF"}