From d7d11c8bd4121fcd06603e4f5c63c693db85bd42 Mon Sep 17 00:00:00 2001 From: Louis Barthonet Date: Wed, 25 Oct 2023 15:28:39 +0100 Subject: [PATCH] fix: ensure regex for Phantom on Android matches the string properly With how the regex was written before, it was matching either Phantom/ios or android, instead of Phantom/android. The test worked as expected, but this broke the newly introduced test for Ecosia, as it would match aswell. --- regexes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regexes.yaml b/regexes.yaml index cc475fbc..e6855d5e 100644 --- a/regexes.yaml +++ b/regexes.yaml @@ -217,7 +217,7 @@ user_agent_parsers: family_replacement: 'Twitter' # Phantom app - - regex: 'Mozilla.{1,200}Mobile.{1,100}(Phantom\/ios|android).(\d+)\.(\d+)\.(\d+)' + - regex: 'Mozilla.{1,200}Mobile.{1,100}(Phantom\/ios|Phantom\/android).(\d+)\.(\d+)\.(\d+)' family_replacement: 'Phantom' # aspiegel.com spider (owned by Huawei, later called PetalBot)