Skip to content

Commit

Permalink
fix: update yandex browser regex (#578)
Browse files Browse the repository at this point in the history
* update yandex browser regex

* Update test_ua.yaml

* fix yandex browser test

---------

Co-authored-by: Carlos Azevedo <[email protected]>
Co-authored-by: Louis <[email protected]>
  • Loading branch information
3 people authored Apr 9, 2024
1 parent 1cb1bf8 commit 0cf88c5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
2 changes: 2 additions & 0 deletions regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ user_agent_parsers:
# Yandex Browser
- regex: '(YaBrowser)/(\d+)\.(\d+)\.(\d+)'
family_replacement: 'Yandex Browser'
- regex: '(YaSearchBrowser)/(\d+)\.(\d+)\.(\d+)'
family_replacement: 'Yandex Browser'

# Mail.ru Amigo/Internet Browser (Chromium-based)
- regex: '(Chrome)/(\d+)\.(\d+)\.(\d+).{0,100} MRCHROME'
Expand Down
30 changes: 24 additions & 6 deletions tests/test_ua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,30 @@ test_cases:
minor: '5'
patch: '1104'

- user_agent_string: 'Mozilla/5.0 (Linux; Android 5.0.1; GT-I9505 Build/LRX22C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 YaBrowser/16.2.1.1239.00 Mobile Safari/537.36'
family: 'Yandex Browser'
major: '16'
minor: '2'
patch: '1'

- user_agent_string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5993.771 YaBrowser/23.11.2.771 Yowser/2.5 Safari/537.36'
family: 'Yandex Browser'
major: '23'
minor: '11'
patch: '2'

- user_agent_string: 'Mozilla/5.0 (Linux; arm; Android 10; M2006C3MNG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 YaApp_Android/23.36.1 YaSearchBrowser/23.36.1 BroPP/1.0 SA/3 Mobile Safari/537.36'
family: 'Yandex Browser'
major: '23'
minor: '36'
patch: '1'

- user_agent_string: 'Mozilla/5.0 (Linux; arm_64; Android 13; 23053RN02Y) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5993.98 YaBrowser/23.11.5.98.00 SA/3 Mobile Safari/537.36'
family: 'Yandex Browser'
major: '23'
minor: '11'
patch: '5'

- user_agent_string: 'Mozilla/5.0 YottaaMonitor;'
family: 'YottaaMonitor'
major:
Expand Down Expand Up @@ -7100,12 +7124,6 @@ test_cases:
minor:
patch:

- user_agent_string: 'Mozilla/5.0 (Linux; Android 5.0.1; GT-I9505 Build/LRX22C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 YaBrowser/16.2.1.1239.00 Mobile Safari/537.36'
family: 'Yandex Browser'
major: '16'
minor: '2'
patch: '1'

- user_agent_string: 'Mozilla/5.0 (Linux; Android 4.4.2; SM-G800F Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.135 MobileIron/1.6.0 Mobile Safari/537.36'
family: 'MobileIron'
major: '1'
Expand Down

0 comments on commit 0cf88c5

Please sign in to comment.