From 0ee6566c21759fb9911fcb98af7496fc184dad8a Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 11 Jul 2022 20:43:44 +0200 Subject: [PATCH] tweak spider exclusion --- files/helpers/wrappers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/wrappers.py b/files/helpers/wrappers.py index 07857b7ba5..7bab3a15b1 100644 --- a/files/helpers/wrappers.py +++ b/files/helpers/wrappers.py @@ -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])