If you clean multiple images (especially from multiple domains), the download will occur simultaneously, and each download may take longer than downloading a single image from the command line. Try decreasing the CONCURRENT_REQUESTS setting and increasing DOWNLOAD_TIMEOUT .
Verify with the scrapy fetch URL that you can get the image to eliminate the Scrapy problem.
Finally, check the differences in the request headers (User-agent, cookies, referrer, etc.), some differences here may explain the difference in the response from the server. If you can find a title that matters, it's easy to change it in Scrapy.
source share