Skip to content

Commit

Permalink
Add detection of HiBrowser and VivoBrowser
Browse files Browse the repository at this point in the history
  • Loading branch information
Sirozha1337 authored and lbarthon committed Sep 17, 2024
1 parent c00d168 commit ad305db
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,12 @@ user_agent_parsers:
- regex: '(Ecosia) android@(\d+)(?:\.(\d+)|)(?:\.(\d+)|)(?:\.(\d+)|)'
family_replacement: 'Ecosia Android'

# VivoBrowser
- regex: '(VivoBrowser)\/(\d+)\.(\d+)\.(\d+)\.(\d+)'

# HiBrowser
- regex: '(HiBrowser)\/v(\d+)\.(\d+)\.(\d+)\.(\d+)'

# Chrome Mobile
- regex: 'Version/.{1,300}(Chrome)/(\d+)\.(\d+)\.(\d+)\.(\d+)'
family_replacement: 'Chrome Mobile WebView'
Expand Down
12 changes: 12 additions & 0 deletions tests/test_ua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,18 @@ test_cases:
minor: '0'
patch: '660'

- user_agent_string: 'Mozilla/5.0 (Linux; Android 11; vivo 1904; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.141 Mobile Safari/537.36 VivoBrowser/11.1.0.1'
family: 'VivoBrowser'
major: '11'
minor: '1'
patch: '0'

- user_agent_string: 'Mozilla/5.0 (Linux; U; Android 13; zh-cn; Infinix X6833B Build/SP1A.210812.016) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.129 HiBrowser/v2.10.1.2 UWS/ Mobile Safari/537.36'
family: 'HiBrowser'
major: '2'
minor: '10'
patch: '1'

- user_agent_string: 'Mozilla/5.0 (Linux; Android 9; Pixel 2 XL Build/PPP5.180610.010; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.85 Mobile Safari/537.36'
family: 'Chrome Mobile WebView'
major: '68'
Expand Down

0 comments on commit ad305db

Please sign in to comment.