MCPcopy
hub / github.com/scrapy/scrapy / cb_wrapper

Method cb_wrapper

scrapy/contracts/__init__.py:183–189  ·  view source on GitHub ↗
(response: Response, **cb_kwargs: Any)

Source from the content-addressed store, hash-verified

181
182 @wraps(cb)
183 def cb_wrapper(response: Response, **cb_kwargs: Any) -> None:
184 try:
185 output = cb(response, **cb_kwargs)
186 output = list(cast("Iterable[Any]", iterate_spider_output(output)))
187 except Exception:
188 case = _create_testcase(method, "callback")
189 results.addError(case, sys.exc_info())
190
191 def eb_wrapper(failure: Failure) -> None:
192 case = _create_testcase(method, "errback")

Callers

nothing calls this directly

Calls 2

iterate_spider_outputFunction · 0.90
_create_testcaseFunction · 0.85

Tested by

no test coverage detected