From 2cb8a8ba00b960af48e837e0993243f050c84404 Mon Sep 17 00:00:00 2001 From: JiangNan <1394485448@qq.com> Date: Sun, 8 Mar 2026 12:54:42 +0800 Subject: [PATCH] fix: guard against None values in _apply_transform to prevent AttributeError Signed-off-by: JiangNan <1394485448@qq.com> --- crawl4ai/extraction_strategy.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crawl4ai/extraction_strategy.py b/crawl4ai/extraction_strategy.py index 6be1c7c7b..4df7c83b4 100644 --- a/crawl4ai/extraction_strategy.py +++ b/crawl4ai/extraction_strategy.py @@ -1216,6 +1216,9 @@ def _apply_transform(self, value, transform): str: The transformed value. """ + if value is None: + return value + if transform == "lowercase": return value.lower() elif transform == "uppercase":