crawl4ai
crawl4ai copied to clipboard
fix: pass user_query to parent class in PruningContentFilter
Summary
PruningContentFilter.__init__() accepts a user_query parameter but passes None to the parent RelevantContentFilter.__init__() instead of forwarding it:
super().__init__(None) # user_query is silently dropped
This means self.user_query is always None in PruningContentFilter, even when the caller explicitly provides a query. Any downstream logic that relies on self.user_query (inherited from RelevantContentFilter) will not work as expected.
Changes
content_filter_strategy.pyline 574:super().__init__(None)→super().__init__(user_query=user_query)
Impact
Users passing user_query to PruningContentFilter would expect query-aware filtering, but the query was silently discarded. This fix ensures the parameter is properly forwarded to the base class.