The rollup's path mix counts people only

Crawlers and the uptime monitor hit the front page hundreds of times a
day and were tallied beside the visitors who read it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
Eric Wagoner
2026-09-06 09:24:55 -04:00
co-authored by Claude Fable 5.1
parent f859d90af8
commit 2bc5fba8d2
+1 -1
View File
@@ -56,7 +56,7 @@ for f in sorted(glob.glob("/var/lib/caddy/access*.log*")):
key = ("/clips" if uri.startswith("/clips") else "/watch" if uri.startswith("/watch")
else "(assets)" if uri.startswith("/assets") or re.search(r"\.(png|jpg|svg|ico|css|js|webmanifest|mp4)$", uri)
else uri if uri in ("/", "/ws", "/robots.txt") else "(other)")
paths[key] += 1
if not isbot: paths[key] += 1 # the path mix is what people looked at
status[str(r.get("status", 0))[0] + "xx"] += 1
ref = " ".join(h.get("Referer", [""]))
m = re.match(r"https?://([^/]+)", ref)