Scrapy, a fast high-level web crawling & scraping framework for Python.
move buffer pointing to start of file before computing checksum. refs #92
Daniel Graña2dbf2a38a2d5
diff --git a/scrapy/contrib/pipeline/images.py b/scrapy/contrib/pipeline/images.pyindex c72b606ed..62aca6de4 100644--- a/scrapy/contrib/pipeline/images.py+++ b/scrapy/contrib/pipeline/images.py@@ -252,6 +252,7 @@ class ImagesPipeline(MediaPipeline):checksum = Nonefor key, image, buf in self.get_images(response, request, info):if checksum is None:+ buf.seek(0)checksum = md5sum(buf)self.store.persist_image(key, image, buf, info)return checksum