Understanding Scrappy Middleware Configuration

Asked 2 years ago, Updated 2 years ago, 44 views

I want to set HTTPCACHE_ENABLED to True in Scrapy, but I don't know how to set it.

I read the Scrapy configuration documentation (https://doc.scrapy.org/en/1.4/topics/downloader-middleware.html), but I don't know how to set HTTPCACHE_ENABLED to True since the following is the only example.

Example)

DOWNLOADER_MIDDLEWARES={
    'myproject.middleware.CustomDownloaderMiddleware':543,
}
  • A little deeper explanation
  • Configuration Example
  • Useful Sites
  • Explanation of the original argument

I would appreciate it if you could write it down.

python

2022-09-30 21:29

1 Answers

It's here.
https://doc.scrapy.org/en/1.4/topics/settings.html#populating-the-settings

If you started with scrapy startproject hoge, you have settings.py, so you can rewrite it (uncommented).


2022-09-30 21:29

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.