I am able to download images through scrapy in to the \"Full\" folder but I need to make the name of the destination folder dynamic, like full/session_id, every
full/session_id
here is the answer stackoverflow.com
class StoreImgPipeline(ImagesPipeline): def file_path(self, request, response=None, info=None): image_guid = hashlib.sha1(to_bytes(request.url)).hexdigest() return 'realty-sc/%s/%s/%s/%s.jpg' % (YEAR, image_guid[:2], image_guid[2:4], image_guid)