class documentation

class ItemLoader(itemloaders.ItemLoader):

View In Hierarchy

A user-friendly abstraction to populate an :ref:`item <topics-items>` with data by applying :ref:`field processors <topics-loaders-processors>` to scraped data. When instantiated with a selector or a response it supports data extraction from web pages using :ref:`selectors <topics-selectors>`.

If no item is given, one is instantiated automatically using the class in default_item_class.

The item, selector, response and remaining keyword arguments are assigned to the Loader context (accessible through the context attribute).

Parameters
itemThe item instance to populate using subsequent calls to ~ItemLoader.add_xpath, ~ItemLoader.add_css, or ~ItemLoader.add_value.
selectorThe selector to extract data from, when using the add_xpath, add_css, replace_xpath, or replace_css method.
responseThe response used to construct the selector using the default_selector_class, unless the selector argument is given, in which case this argument is ignored.
Method __init__ Undocumented
def __init__(self, item=None, selector=None, response=None, parent=None, **context):

Undocumented