Skip to content

Commit

Permalink
Merge pull request #595 from csazevedo/csazevedo/fix-ecosia-browser-r…
Browse files Browse the repository at this point in the history
…egex

fix: update ecosia browser regex to match multiple versioning structures
  • Loading branch information
migueldemoura authored Jul 10, 2024
2 parents df56280 + cc19966 commit 1458dfa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,9 @@ user_agent_parsers:
family_replacement: 'Tenta Browser'

# Ecosia on iOS / Android
- regex: '(Ecosia) ios@(\d+)\.(\d+)\.(\d+)\.(\d+)'
- regex: '(Ecosia) ios@(\d+)(?:\.(\d+)|)(?:\.(\d+)|)(?:\.(\d+)|)'
family_replacement: 'Ecosia iOS'
- regex: '(Ecosia) android@(\d+)\.(\d+)\.(\d+)\.(\d+)'
- regex: '(Ecosia) android@(\d+)(?:\.(\d+)|)(?:\.(\d+)|)(?:\.(\d+)|)'
family_replacement: 'Ecosia Android'

# Chrome Mobile
Expand Down
7 changes: 7 additions & 0 deletions tests/test_ua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8797,6 +8797,13 @@ test_cases:
patch: '4951'
patch_minor: '41'

- user_agent_string: 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Mobile Safari/537.36 (Ecosia android@119)'
family: 'Ecosia Android'
major: '119'
minor:
patch:
patch_minor:

- user_agent_string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 MullvadBrowser/102.13.0'
family: 'MullvadBrowser'
major: '102'
Expand Down

0 comments on commit 1458dfa

Please sign in to comment.