Check in lower case

main
Bob Mottram 2021-06-20 17:12:19 +01:00
parent b45d034332
commit 02b53231b9
1 changed files with 2 additions and 1 deletions

View File

@ -459,7 +459,8 @@ class PubServer(BaseHTTPRequestHandler):
agentDomain = None
if self.headers.get('User-Agent'):
agentStr = self.headers['User-Agent']
if 'bot/' in agentStr or 'bot-' in agentStr.lower():
agentStrLower = agentStr.lower()
if 'bot/' in agentStrLower or 'bot-' in agentStrLower:
print('Crawler: ' + agentStr)
return True
agentDomain = userAgentDomain(agentStr, self.server.debug)