diff --git a/crawl4ai/content_filter_strategy.py b/crawl4ai/content_filter_strategy.py index 50baed27..6c886b36 100644 --- a/crawl4ai/content_filter_strategy.py +++ b/crawl4ai/content_filter_strategy.py @@ -665,7 +665,7 @@ class PruningContentFilter(RelevantContentFilter): def _remove_comments(self, soup): """Removes HTML comments""" - for element in soup(text=lambda text: isinstance(text, Comment)): + for element in soup(string=lambda string: isinstance(string, Comment)): element.extract() def _remove_unwanted_tags(self, soup):