tweak spider exclusion

master
Aevann1 2022-07-11 20:43:44 +02:00
parent f8bf31a051
commit 0ee6566c21
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ def get_logged_in_user():
g.db.add(v)
else:
ua = str(user_agents.parse(g.agent))
if not ua.startswith('Spider') and 'bot' not in ua.lower():
if 'spider' not in ua.lower() and 'bot' not in ua.lower():
loggedout[session["session_id"]] = (timestamp, ua)
g.loggedin_counter = len([x for x in loggedin.values() if timestamp-x < LOGGEDIN_ACTIVE_TIME])