(
self,
response: Response,
request: Request,
info: MediaPipeline.SpiderInfo,
*,
item: Any = None,
)
| 687 | self.crawler.stats.inc_value(f"file_status_count/{status}") |
| 688 | |
| 689 | async def _file_downloaded( |
| 690 | self, |
| 691 | response: Response, |
| 692 | request: Request, |
| 693 | info: MediaPipeline.SpiderInfo, |
| 694 | *, |
| 695 | item: Any = None, |
| 696 | ) -> str: |
| 697 | path = self.file_path(request, response=response, info=info, item=item) |
| 698 | buf = BytesIO(response.body) |
| 699 | checksum = _md5sum(buf) |
| 700 | buf.seek(0) |
| 701 | await ensure_awaitable(self.store.persist_file(path, buf, info)) |
| 702 | return checksum |
| 703 | |
| 704 | # Overridable Interface |
| 705 | def get_media_requests( |
no test coverage detected