@@ -137,9 +137,9 @@ Custom attribute extraction
137137---------------------------
138138
139139You can request custom attribute extraction by using either a
140- :class: `scrapy_zyte_api .CustomAttributes ` dependency (if you need both the
140+ :class: `zyte_common_items .CustomAttributes ` dependency (if you need both the
141141attribute values and the attribute extraction metadata) or a
142- :class: `scrapy_zyte_api .CustomAttributesValues ` dependency (if you only need
142+ :class: `zyte_common_items .CustomAttributesValues ` dependency (if you only need
143143the values). You need to annotate it with input data as a dictionary and, if
144144needed, a dictionary with extraction options. You should use the
145145:func: `scrapy_zyte_api.custom_attrs ` function to create the annotation:
@@ -148,7 +148,8 @@ needed, a dictionary with extraction options. You should use the
148148
149149 from typing import Annotated
150150
151- from scrapy_zyte_api import CustomAttributes, custom_attrs
151+ from scrapy_zyte_api import custom_attrs
152+ from zyte_common_items import CustomAttributes
152153
153154
154155 @attrs.define
@@ -168,7 +169,7 @@ You can then access the results as the dependency value:
168169
169170 def parse_page (self , response : DummyResponse, page : MyPageObject):
170171 ...
171- for k, v in page.custom_attributes.items():
172+ for k, v in page.custom_attributes.values. items():
172173 ...
173174
174175
0 commit comments