Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

fixed RFPDupeFilter persistence

Mikhail Korobov836cb84b7a78
diff --git a/scrapy/dupefilters.py b/scrapy/dupefilters.py
index 739ba922f..9d8966b9c 100644
--- a/scrapy/dupefilters.py
+++ b/scrapy/dupefilters.py
@@ -36,6 +36,7 @@ class RFPDupeFilter(BaseDupeFilter):
self.logger = logging.getLogger(__name__)
if path:
self.file = open(os.path.join(path, 'requests.seen'), 'a+')
+ self.file.seek(0)
self.fingerprints.update(x.rstrip() for x in self.file)
@classmethod