Merge branch 'main' of gitlab.com:bashrc2/epicyon

merge-requests/30/head
Bob Mottram 2022-03-09 22:56:19 +00:00
commit 14e86227af
1 changed files with 4 additions and 2 deletions

View File

@ -126,8 +126,10 @@ def blocked_user_agent(calling_domain: str, agent_str: str,
contains_bot_string = False
for bot_str in bot_strings:
if bot_str in agent_str_lower:
contains_bot_string = True
break
if '://bot' not in agent_str_lower and \
'://robot' not in agent_str_lower:
contains_bot_string = True
break
if contains_bot_string:
if agent_str_lower not in known_bots:
known_bots.append(agent_str_lower)