Skip to content

The agent engineering platform.

feat(core): add more file extensions to ignore in HTML link extraction (#34552)

Aman Gupta2847814c70cb
diff --git a/libs/core/langchain_core/utils/html.py b/libs/core/langchain_core/utils/html.py
index b6bbf5cf22..e928cbd51d 100644
--- a/libs/core/langchain_core/utils/html.py
+++ b/libs/core/langchain_core/utils/html.py
@@ -21,6 +21,12 @@ SUFFIXES_TO_IGNORE = (
".bz2",
".zip",
".epub",
+ ".webp",
+ ".pdf",
+ ".docx",
+ ".xlsx",
+ ".pptx",
+ ".pptm",
)
SUFFIXES_TO_IGNORE_REGEX = (
"(?!" + "|".join([re.escape(s) + r"[\#'\"]" for s in SUFFIXES_TO_IGNORE]) + ")"