get_media_requests item_completed然后检查settings.py中是否配置了一下两个常量
item_pipelines = ['scrapy.contrib.pipeline.images.imagespipeline'] images_store = '/your/path/here'②自定义保存图片名称 图片保存的时候,图片名称默认是文件sha1值,要想自定义图片名称,可以重写file_path方法,下面是demo:
def file_path(self, request, response=None, info=None): image_guid = request.url.split('/')[-1] return 'download_images/%s' % (image_guid)