MulaiMulai sekarang secara gratis

HTML document loaders

It's possible to load documents from many different formats, including complex formats like HTML.

In this exercise, you'll load an HTML file containing a White House executive order.

Latihan ini adalah bagian dari kursus

Developing LLM Applications with LangChain

Lihat Kursus

Petunjuk latihan

  • Use the UnstructuredHTMLLoader class to load the white_house_executive_order_nov_2023.html file in the current directory.
  • Load the documents into memory.
  • Print the first document.
  • Print the first document's metadata.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

from langchain_community.document_loaders import UnstructuredHTMLLoader

# Create a document loader for unstructured HTML
loader = ____

# Load the document
data = ____

# Print the first document
print(____)

# Print the first document's metadata
print(____)
Edit dan Jalankan Kode