Ahead with enhancements on comparison algorithm: implemented content-length technique

This commit is contained in:
Bernardo Damele
2008-12-18 22:49:35 +00:00
parent afbd66f6d9
commit 68354be45a
3 changed files with 17 additions and 11 deletions

View File

@@ -75,7 +75,11 @@ def comparison(page, headers=None, content=False):
# Comparison algorithm based on Content-Length header value
elif conf.contentLengths:
pass
minValue = conf.contentLengths[0] - 10
maxValue = conf.contentLengths[1] + 10
if len(page) >= minValue and len(page) <= maxValue:
return True
# Comparison algorithm based on page content's stable lines subset
elif conf.equalLines: