Scrapy : create folder structure out of downloaded images based on the url from which images are being downloaded
问题 I have an array of links that define the structure of a website. While downloading images from these links, I want to simultaneously place the downloaded images in a folder structure similar to the website structure, and not just rename it (as answered in Scrapy image download how to use custom filename) My code for the same is like this: class MyImagesPipeline(ImagesPipeline): """Custom image pipeline to rename images as they are being downloaded""" page_url=None def image_key(self, url):