MCPcopy
hub / github.com/scrapy/scrapy / item_completed

Method item_completed

scrapy/pipelines/media.py:299–313  ·  view source on GitHub ↗

Called per item when all media requests has been processed

(
        self, results: list[FileInfoOrError], item: Any, info: SpiderInfo
    )

Source from the content-addressed store, hash-verified

297 raise NotImplementedError
298
299 def item_completed(
300 self, results: list[FileInfoOrError], item: Any, info: SpiderInfo
301 ) -> Any:
302 """Called per item when all media requests has been processed"""
303 if self.LOG_FAILED_RESULTS:
304 for ok, value in results:
305 if not ok:
306 assert isinstance(value, Failure)
307 logger.error(
308 "%(class)s found errors processing %(item)s",
309 {"class": self.__class__.__name__, "item": item},
310 exc_info=failure_to_exc_info(value),
311 extra={"spider": info.spider},
312 )
313 return item
314
315 @abstractmethod
316 def file_path(

Callers 1

process_itemMethod · 0.95

Calls 2

failure_to_exc_infoFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected