Create a base class RedisPipeline
, whichever Pipeline inherits it get a redis connection. Access to the redis conn with self.redis_server
.
Dependency: scrapy_redis
.
# defaults.py
REDIS_ENCODING = "utf-8"
REDIS_FAILED_URLS_KEY = "%(spidername)s:failed_urls"