TeamHG-Memex / scrapy-crawl-once

Scrapy middleware which allows to crawl only new content
MIT License
79 stars 23 forks source link

fingerprint function deprecation warning #6

Open joeharrison714 opened 2 years ago

joeharrison714 commented 2 years ago

After upgraded scrapy, The follow warning occurs on every request that uses crawl_once:

2022-10-28 15:54:21 [py.warnings] WARNING: /scrapyd/venv/lib/python3.9/site-packages/scrapy_crawl_once/middlewares.py:96: ScrapyDeprecationWarning: Call to deprecated function scrapy.utils.request.request_fingerprint().

If you are using this function in a Scrapy component, and you are OK with users of your component changing the fingerprinting algorithm through settings, use crawler.request_fingerprinter.fingerprint() instead in your Scrapy component (you can get the crawler object from the 'from_crawler' class method).

Otherwise, consider using the scrapy.utils.request.fingerprint() function instead.