mirror of https://gitlab.com/bashrc2/epicyon
Don't block crawlers on news instances
parent
784aca35f3
commit
df3de68e52
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue