MCPcopy
hub / github.com/scrapy/scrapy / __init__

Method __init__

scrapy/loader/__init__.py:92–106  ·  view source on GitHub ↗
(
        self,
        item: Any = None,
        selector: Selector | None = None,
        response: TextResponse | None = None,
        parent: itemloaders.ItemLoader | None = None,
        **context: Any,
    )

Source from the content-addressed store, hash-verified

90 default_selector_class = Selector
91
92 def __init__(
93 self,
94 item: Any = None,
95 selector: Selector | None = None,
96 response: TextResponse | None = None,
97 parent: itemloaders.ItemLoader | None = None,
98 **context: Any,
99 ):
100 if selector is None and response is not None:
101 try:
102 selector = self.default_selector_class(response)
103 except AttributeError:
104 selector = None
105 context.update(response=response)
106 super().__init__(item=item, selector=selector, parent=parent, **context)

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected