Scrapy, a fast high-level web crawling & scraping framework for Python.
Merge pull request #1081 from scrapy/dict-items
Pablo Hoffmanbb4c922d8503
diff --cc docs/topics/items.rstindex 17f10a88c,3fda20494..ac3eb6699--- a/docs/topics/items.rst+++ b/docs/topics/items.rst@@@ -8,14 -8,23 +8,23 @@@ Item:synopsis: Item and Field classesThe main goal in scraping is to extract structured data from unstructured- sources, typically, web pages. Scrapy provides the :class:`Item` class for this- purpose.+ sources, typically, web pages. Scrapy spiders can return the extracted data+ as Python dicts. While convenient and familiar, Python dicts lack structure:+ it is easy to make a typo in a field name or return inconsistent data,+ especially in a larger project with many spiders.+ To define common output data format Scrapy provides the :class:`Item` class.:class:`Item` objects are simple containers used to collect the scraped data.They provide a `dictionary-like`_ API with a convenient syntax for declaring- their available fields.+ their available fields.++ Various Scrapy components use extra information provided by Items:+ exporters look at declared fields to figure out columns to export,+ serialization can be customized using Item fields metadata, :mod:`trackref`+ tracks Item instances to help finding memory leaks+ (see :ref:`topics-leaks-trackrefs`_), etc.-.. _dictionary-like: http://docs.python.org/library/stdtypes.html#dict+.. _dictionary-like: https://docs.python.org/2/library/stdtypes.html#dict.. _topics-items-declaring: