improvement of dynamicity engine

This commit is contained in:
Miroslav Stampar 2010-11-29 14:30:57 +00:00
parent 76ce9cc888
commit be6df7abd9

View File

@ -427,6 +427,12 @@ def checkDynamicContent(firstPage, secondPage):
if suffix is None and (blocks[i][0] + blocks[i][2] >= len(firstPage)):
continue
while prefix and prefix[-1].isalnum():
prefix = prefix[:-1]
while suffix and suffix[0].isalnum():
suffix = suffix[1:]
kb.dynamicMarkings.append((re.escape(prefix[-conf.dynMarkLength:]) if prefix else None, re.escape(suffix[:conf.dynMarkLength]) if suffix else None))
if len(kb.dynamicMarkings) > 0: