Skip to content

Commit

Permalink
feat(client) detect app for clienthints: Browlser, Browser Hup Pro, F…
Browse files Browse the repository at this point in the history
…lyperlink, Bangla Browser, Coc Coc

feat(client) detect app for ua: Browlser, Bangla Browser

ref matomo-org#7039
  • Loading branch information
sanchezzzhak committed Aug 29, 2022
1 parent ae3d8df commit 5b6f48c
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ class Browser extends AbstractClientParser
'BM' => 'Beamrise',
'BB' => 'BlackBerry Browser',
'H1' => 'BrowseHere',
'B8' => 'Browser Hup Pro',
'BD' => 'Baidu Browser',
'BS' => 'Baidu Spark',
'B9' => 'Bangla Browser',
'BI' => 'Basilisk',
'BV' => 'Belva Browser',
'B5' => 'Beyond Private Browser',
Expand All @@ -132,6 +134,7 @@ class Browser extends AbstractClientParser
'B3' => 'Browspeed Browser',
'BX' => 'BrowseX',
'BZ' => 'Browzar',
'B7' => 'Browlser',
'BY' => 'Biyubi',
'BF' => 'Byffox',
'B4' => 'BF Browser',
Expand Down Expand Up @@ -226,6 +229,7 @@ class Browser extends AbstractClientParser
'FN' => 'Fireweb Navigator',
'FH' => 'Flash Browser',
'FS' => 'Flast',
'F5' => 'Flyperlink',
'FU' => 'FreeU',
'F3' => 'Frost+',
'FI' => 'Fulldive',
Expand Down Expand Up @@ -572,7 +576,7 @@ class Browser extends AbstractClientParser
'XO', 'U0', 'B0', 'VA', 'X0', 'NX', 'O5', 'R1', 'I1',
'HO', 'A5', 'X1', '18', 'B5', 'B6', 'TC', 'A6', '2X',
'F4', 'YG', 'WR', 'NA', 'DM', '1M', 'A7', 'XN', 'XT',
'XB', 'W1', 'HT',
'XB', 'W1', 'HT', 'B8', 'F5', 'B9',
],
'Firefox' => [
'AX', 'BI', 'BF', 'BH', 'BN', 'C0', 'CU', 'EI', 'F1',
Expand Down Expand Up @@ -609,7 +613,8 @@ class Browser extends AbstractClientParser
'AZ', 'MM', 'BT', 'N0', 'P0', 'F3', 'DU', 'D0', 'P1',
'O4', 'XO', 'U0', 'B0', 'VA', 'X0', 'A5', 'X1', '18',
'B5', 'B6', 'TC', 'A6', '2X', 'F4', 'YG', 'WR', 'NA',
'DM', '1M', 'A7', 'XN', 'XT', 'XB', 'W1', 'HT',
'DM', '1M', 'A7', 'XN', 'XT', 'XB', 'W1', 'HT', 'B7',
'B9',
];

/**
Expand Down
73 changes: 73 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6999,3 +6999,76 @@
family: Chrome
headers:
http-x-requested-with: com.htc.sense.browser
-
user_agent: Mozilla/5.0 (Linux; Android 12; SM-A325F Build/SP1A.210812.016;) Browlser/1.7.8
client:
type: browser
name: Browlser
version: 1.7.8
engine: ""
engine_version: ""
family:
-
user_agent: Mozilla/5.0 (Linux; Android 12; SM-A325F Build/SP1A.210812.016;) Browlser/1.7.8
client:
type: browser
name: Browlser
version: 1.7.8
engine: ""
engine_version: ""
family:
headers:
http-x-requested-with: com.browlser
-
user_agent: Mozilla/5.0 (Linux; Android 9; MRD-LX1 Build/HUAWEIMRD-LX1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36
client:
type: browser
name: Browser Hup Pro
version: ""
engine: Blink
engine_version: 88.0.4324.181
family: Chrome
headers:
http-x-requested-with: app.browserhub.download
-
user_agent: Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36
client:
type: browser
name: Flyperlink
version: ""
engine: Blink
engine_version: 83.0.4103.101
family: Chrome
headers:
http-x-requested-with: com.flyperinc.flyperlink
-
user_agent: Mozilla/5.0 (Linux; Android 10; STK-L21 Build/HUAWEISTK-L21) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/73.0.3683.90 Mobile Safari/537.36 BanglaBrowser/2.0.2
client:
type: browser
name: Bangla Browser
version: 2.0.2
engine: Blink
engine_version: 73.0.3683.90
family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 7.1.1; SM-T385 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/62.0.3202.84 Safari/537.36
client:
type: browser
name: Bangla Browser
version: ""
engine: Blink
engine_version: 62.0.3202.84
family: Chrome
headers:
http-x-requested-with: com.w3engineers.banglabrowser
-
user_agent: Mozilla/5.0 (Linux; Android 9; SM-A105F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/81.0.4044.138 Mobile Safari/537.36
client:
type: browser
name: Coc Coc
version: ""
engine: Blink
engine_version: 81.0.4044.138
family: Chrome
headers:
http-x-requested-with: com.coccoc.trinhduyet
12 changes: 12 additions & 0 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,13 @@
name: 'Smooz'
version: '$1'

# Bangla Browser (https://play.google.com/store/apps/details?id=com.w3engineers.banglabrowser)
- regex: 'BanglaBrowser/(\d+\.[.\d]+)'
name: 'Bangla Browser'
version: '$1'
engine:
default: 'Blink'

# Cornowser (https://github.com/xdevs23/Cornowser)
- regex: 'Cornowser/(\d+[\.\d]+)'
name: 'Cornowser'
Expand Down Expand Up @@ -2612,6 +2619,11 @@
name: 'BlackBerry Browser'
version: ''

# Browlser (https://play.google.com/store/apps/details?id=com.browlser | https://browlser.io/)
- regex: 'Browlser/(\d+[\.\d]+)'
name: 'Browlser'
version: '$1'

#Android Browser
- regex: '(?<! like )Android'
name: 'Android Browser'
Expand Down
5 changes: 5 additions & 0 deletions regexes/client/hints/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,8 @@
'com.sweetbrowser.ice': 'Sweet Browser'
'com.mcent.browser': 'mCent'
'com.htc.sense.browser': 'HTC Browser'
'com.browlser': 'Browlser'
'app.browserhub.download': 'Browser Hup Pro'
'com.flyperinc.flyperlink': 'Flyperlink'
'com.w3engineers.banglabrowser': 'Bangla Browser'
'com.coccoc.trinhduyet': 'Coc Coc'

0 comments on commit 5b6f48c

Please sign in to comment.