From 21a21cd68f2946b1b397cc59b4efeb8de0490f46 Mon Sep 17 00:00:00 2001 From: Gregory Soutade Date: Sat, 4 Feb 2023 08:40:04 +0100 Subject: [PATCH] Add a new rule for robots : 1 page and 1 hit, but not from the same source --- plugins/pre_analysis/robots.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/pre_analysis/robots.py b/plugins/pre_analysis/robots.py index 922c9d2..3f7c7bb 100644 --- a/plugins/pre_analysis/robots.py +++ b/plugins/pre_analysis/robots.py @@ -158,3 +158,10 @@ class IWLAPreAnalysisRobots(IPlugin): (super_hit['viewed_hits'][0] and not referers): self._setRobot(k, super_hit) continue + +# 8) Special case : 1 page and 1 hit, but not from the same source + if (super_hit['viewed_pages'][0] == 1 and super_hit['viewed_hits'][0] == 1 and len(super_hit['requests']) == 2) and\ + (super_hit['requests'][0]['server_name'] != super_hit['requests'][1]['server_name']): + self._setRobot(k, super_hit) + continue +