Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 47720a4

Browse files
committed
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)
1 parent 5ebd5d9 commit 47720a4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/request/comparison.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,7 @@ def comparison(page, headers=None, getSeqMatcher=False, pageLength=None):
116116
# If the url is not stable it returns sequence matcher between the
117117
# first untouched HTTP response page content and this content
118118
else:
119-
return (ratio - conf.matchRatio) > DIFF_TOLERANCE
119+
if kb.pageStable:
120+
return (ratio - conf.matchRatio) > DIFF_TOLERANCE
121+
else:
122+
return ratio > conf.matchRatio

0 commit comments

Comments
 (0)