Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dupefilter.py): add custom RedisDupeFilter class to handle dupli…
…cate requests based on request fingerprint The `dupefilter.py` file introduces a new class called `RedisDupeFilter` which extends the `RFPDupeFilter` class. This class is responsible for handling duplicate requests in the rent crawler application. The `RedisDupeFilter` class overrides the `request_fingerprint` method to generate a unique fingerprint for each request. The fingerprint is generated by creating a dictionary `fingerprint_data` containing the request method, URL, and request body. The request body is converted to hexadecimal format if it exists. The dictionary is then serialized to JSON and hashed using SHA1 algorithm to generate the fingerprint. This custom dupe filter is designed to work with Redis as the backend for storing and checking duplicate requests. chore(middlewares.py): remove unused RedisKeySpiderMiddleware class
- Loading branch information