Don't block crawlers on news instances

merge-requests/30/head
Bob Mottram 2021-06-28 18:28:57 +01:00
parent 784aca35f3
commit df3de68e52
1 changed files with 1 additions and 1 deletions

View File

@ -466,7 +466,7 @@ class PubServer(BaseHTTPRequestHandler):
# is this a web crawler? If so the block it # is this a web crawler? If so the block it
agentStrLower = agentStr.lower() agentStrLower = agentStr.lower()
if 'bot/' in agentStrLower or 'bot-' in agentStrLower: if 'bot/' in agentStrLower or 'bot-' in agentStrLower:
if if self.server.newsInstance: if self.server.newsInstance:
return False return False
print('Blocked Crawler: ' + agentStr) print('Blocked Crawler: ' + agentStr)
return True return True