From 47720a43dd3b0e1ac0a02aab26e66b96dc47e023 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 9 Nov 2010 23:21:21 +0000 Subject: [PATCH] minor fix (while we've calculated conf.matchRation for stable pages, we've put a constant value (0.900) for dynamic ones - so putting (ratio - conf.matchRatio) > DIFF_TOLERANCE for dynamic pages too would just effectively increase it's value to 0.900 + DIFF_TOLERANCE (in our case to 0.950) which is too narrow space for True result) --- lib/request/comparison.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/request/comparison.py b/lib/request/comparison.py index f672fb6a7..60fc3b64e 100644 --- a/lib/request/comparison.py +++ b/lib/request/comparison.py @@ -116,4 +116,7 @@ def comparison(page, headers=None, getSeqMatcher=False, pageLength=None): # If the url is not stable it returns sequence matcher between the # first untouched HTTP response page content and this content else: - return (ratio - conf.matchRatio) > DIFF_TOLERANCE + if kb.pageStable: + return (ratio - conf.matchRatio) > DIFF_TOLERANCE + else: + return ratio > conf.matchRatio \ No newline at end of file