Skip to content

Commit 7c0c927

Browse files
Merge pull request #13753 from guardian/ashishpuliyel-patch-1
Update user-agent script
2 parents a7ce286 + 9a582fd commit 7c0c927

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/deno/bots.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ const { QueryExecutionId } = await client.send(
4444
WHERE year = ${date.year}
4545
AND month = ${String(date.month).padStart(2, "0")}
4646
AND day = ${String(date.day).padStart(2, "0")}
47-
AND request_user_agent NOT LIKE 'Guardian%'
47+
AND request_user_agent NOT LIKE 'Guardian/%Darwin%'
48+
AND request_user_agent NOT LIKE 'GuardianNews/%'
49+
AND request_user_agent NOT LIKE 'Guardian\%20Editions/%'
50+
AND response_status=200
51+
AND url != '/robots.txt'
4852
GROUP BY request_user_agent
4953
ORDER BY request_count desc
5054
LIMIT ${100_000}`,

0 commit comments

Comments
 (0)