The problem of redis_key in scrapy_redis

redis_key = "jingzhun:starturls" lpush pushcookie header 
Nov.11,2021

override this method of scrapy_redis

def make_request_from_data(self, data):
        """Returns a Request instance from data coming from Redis.
        By default, ``data`` is an encoded URL. You can override this method to
        provide your own message decoding.
        Parameters
        ----------
        data : bytes
            Message from redis.
        """
        url = bytes_to_str(data, self.redis_encoding)
        return self.make_requests_from_url(url)

or the method called in return, customize the request.

Menu