From 7ef5409fd0215ef3cf5f6b920b7b588c0bd5fe48 Mon Sep 17 00:00:00 2001 From: Kevin Lloyd Bernal Date: Fri, 10 Nov 2023 12:09:35 +0800 Subject: [PATCH] Setup ZyteItemAdapater --- docs/setup.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/setup.rst b/docs/setup.rst index 96304a4..247f301 100644 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -70,6 +70,13 @@ The following additional settings are recommended: ``"zyte_crawlers.middlewares.CrawlingLogsMiddleware": 1000``, to log crawl data in JSON format for debugging purposes. +- Ensure that :class:`zyte_common_items.ZyteItemAdapter` is also configured:: + + from itemadapter import ItemAdapter + from zyte_common_items import ZyteItemAdapter + + ItemAdapter.ADAPTER_CLASSES.appendleft(ZyteItemAdapter) + For an example of a properly configured ``settings.py`` file, see `the one in zyte-spider-templates-project`_.