diff --git a/zyte_common_items/pipelines.py b/zyte_common_items/pipelines.py index d3ddf19..2402a3e 100644 --- a/zyte_common_items/pipelines.py +++ b/zyte_common_items/pipelines.py @@ -1,7 +1,7 @@ from copy import deepcopy from warnings import warn -from zyte_common_items import CustomAttributes, ae +from zyte_common_items import ae class AEPipeline: @@ -137,7 +137,8 @@ def process_item(self, item, spider): # instead of dropping the whole result new_item = {} for item_type, sub_item in item.items(): - if item_type is CustomAttributes: + if item_type == "customAttributes": + new_item[item_type] = sub_item continue threshold = self.get_threshold_for_item(sub_item, spider) if self._process_probability(sub_item, threshold):