Skip to content

Commit

Permalink
fix: ensure regex for Phantom on Android matches the string properly
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lbarthon committed Oct 25, 2023
1 parent 6eef3d4 commit d7d11c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d7d11c8

Please sign in to comment.