mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
Um, made urlSnarfer do what it was actually intended to do :)
This commit is contained in:
parent
7cbec39d55
commit
a2a97c1d83
@ -163,8 +163,11 @@ def urlSnarfer(f):
|
|||||||
q = getattr(self, '_snarfedUrls', None)
|
q = getattr(self, '_snarfedUrls', None)
|
||||||
if q is None:
|
if q is None:
|
||||||
q = structures.smallqueue()
|
q = structures.smallqueue()
|
||||||
|
self._snarfedUrls = q
|
||||||
|
#debug.printf('before pruning: %r' % q)
|
||||||
while q and q[0][2] < cutoff:
|
while q and q[0][2] < cutoff:
|
||||||
q.dequeue()
|
q.dequeue()
|
||||||
|
#debug.printf('after pruning: %r' % q)
|
||||||
url = match.group(0)
|
url = match.group(0)
|
||||||
if any(lambda t: t[0] == url and t[1] == msg.args[0], q) and \
|
if any(lambda t: t[0] == url and t[1] == msg.args[0], q) and \
|
||||||
not world.testing:
|
not world.testing:
|
||||||
|
Loading…
Reference in New Issue
Block a user