{ "cells": [ { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "from langchain.document_loaders import WebBaseLoader" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "loader = WebBaseLoader(\"https://www.baidu.com/\")" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "data = loader.load()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[Document(page_content='\\n ç\\x99¾åº¦ä¸\\x80ä¸\\x8bï¼\\x8cä½\\xa0å°±ç\\x9f¥é\\x81\\x93 æ\\x96°é\\x97» hao123 å\\x9c°å\\x9b¾ è§\\x86é¢\\x91 è´´å\\x90§ ç\\x99»å½\\x95 æ\\x9b´å¤\\x9a产å\\x93\\x81 å\\x85³äº\\x8eç\\x99¾åº¦ About Baidu ©2017\\xa0Baidu\\xa0使ç\\x94¨ç\\x99¾åº¦å\\x89\\x8då¿\\x85读\\xa0 æ\\x84\\x8fè§\\x81å\\x8f\\x8dé¦\\x88\\xa0京ICPè¯\\x81030173å\\x8f·\\xa0 \\n', metadata={'source': 'https://www.baidu.com/', 'title': 'ç\\x99¾åº¦ä¸\\x80ä¸\\x8bï¼\\x8cä½\\xa0å°±ç\\x9f¥é\\x81\\x93', 'language': None})]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data" ] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.10" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }