(
self,
response: Response,
result: AsyncIterator[_T],
start_index: int = 0,
)
| 150 | raise exception |
| 151 | |
| 152 | def _process_spider_output( |
| 153 | self, |
| 154 | response: Response, |
| 155 | result: AsyncIterator[_T], |
| 156 | start_index: int = 0, |
| 157 | ) -> MutableAsyncChain[_T]: |
| 158 | # items in this iterable do not need to go through the process_spider_output |
| 159 | # chain, they went through it already from the process_spider_exception method |
| 160 | recovered: MutableAsyncChain[_T] = MutableAsyncChain() |
| 161 | method_list = islice(self.methods["process_spider_output"], start_index, None) |
| 162 | for method_index, method in enumerate(method_list, start=start_index): |
| 163 | if method is None: |
| 164 | continue |
| 165 | if method in self._mw_methods_requiring_spider: |
| 166 | result = method(response=response, result=result, spider=self._spider) |
| 167 | else: |
| 168 | result = method(response=response, result=result) |
| 169 | result = self._evaluate_iterable( |
| 170 | response, result, method_index + 1, recovered |
| 171 | ) |
| 172 | return MutableAsyncChain(result, recovered) |
| 173 | |
| 174 | async def _process_callback_output( |
| 175 | self, response: Response, result: AsyncIterator[_T] |
no test coverage detected