Search for "compatible" in all requests, not only the first one
This commit is contained in:
parent
b29765dda9
commit
a5bef4ece6
|
@ -76,9 +76,11 @@ class IWLAPreAnalysisRobots(IPlugin):
|
||||||
self.logger.debug('%s is a robot (caller %s:%d)' % (k, info.function, info.lineno))
|
self.logger.debug('%s is a robot (caller %s:%d)' % (k, info.function, info.lineno))
|
||||||
super_hit['robot'] = 1
|
super_hit['robot'] = 1
|
||||||
super_hit['keep_requests'] = False
|
super_hit['keep_requests'] = False
|
||||||
robot_name = self.compatible_re.match(super_hit['requests'][0]['http_user_agent'])
|
for hit in super_hit['requests']:
|
||||||
|
robot_name = self.compatible_re.match(hit['http_user_agent'])
|
||||||
if robot_name:
|
if robot_name:
|
||||||
super_hit['robot_name'] = robot_name[1]
|
super_hit['robot_name'] = robot_name[1]
|
||||||
|
break
|
||||||
|
|
||||||
# Basic rule to detect robots
|
# Basic rule to detect robots
|
||||||
def hook(self):
|
def hook(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user