mirror of https://gitlab.com/bashrc2/epicyon
Don't block crawlers on news instances
parent
97ec53143c
commit
784aca35f3
|
@ -466,6 +466,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
# is this a web crawler? If so the block it
|
||||
agentStrLower = agentStr.lower()
|
||||
if 'bot/' in agentStrLower or 'bot-' in agentStrLower:
|
||||
if if self.server.newsInstance:
|
||||
return False
|
||||
print('Blocked Crawler: ' + agentStr)
|
||||
return True
|
||||
# get domain name from User-Agent
|
||||
|
|
Loading…
Reference in New Issue