Minor update for crawler

This commit is contained in:
stamparm 2013-04-30 18:32:46 +02:00
parent 887109a12d
commit 2bfdac5ebc

View File

@ -27,6 +27,7 @@ from thirdparty.oset.pyoset import oset
def crawl(target):
try:
visited = set()
threadData = getCurrentThreadData()
threadData.shared.value = oset()
@ -37,6 +38,10 @@ def crawl(target):
with kb.locks.limit:
if threadData.shared.unprocessed:
current = threadData.shared.unprocessed.pop()
if current in visited:
continue
else:
visited.add(current)
else:
break