Skip to content

Commit

Permalink
Adds detection for U Browser
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuconcioiu committed Jul 7, 2022
1 parent 6fa661c commit dc6e544
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ class Browser extends AbstractClientParser
'TG' => 'ToGate',
'TS' => 'TweakStyle',
'TV' => 'TV Bro',
'U0' => 'U Browser',
'UB' => 'UBrowser',
'UC' => 'UC Browser',
'UH' => 'UC Browser HD',
Expand Down Expand Up @@ -529,7 +530,7 @@ class Browser extends AbstractClientParser
'2S', 'RF', 'LR', 'SQ', 'BV', 'L1', 'F0', 'KS', 'V0',
'C8', 'AZ', 'MM', 'BT', 'N0', 'P0', 'F3', 'VS', 'DU',
'D0', 'P1', 'O4', '8S', 'H3', 'TE', 'WB', 'K1', 'P2',
'XO',
'XO', 'U0',
],
'Firefox' => [
'AX', 'BI', 'BF', 'BH', 'BN', 'C0', 'CU', 'EI', 'F1',
Expand Down Expand Up @@ -564,7 +565,7 @@ class Browser extends AbstractClientParser
'YO', 'PK', 'MR', 'AP', 'AK', 'UI', 'SD', 'VN', '4S',
'RF', 'LR', 'SQ', 'BV', 'L1', 'F0', 'KS', 'V0', 'C8',
'AZ', 'MM', 'BT', 'N0', 'P0', 'F3', 'DU', 'D0', 'P1',
'O4', 'XO',
'O4', 'XO', 'U0',
];

/**
Expand Down
11 changes: 11 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6119,3 +6119,14 @@
family: Chrome
headers:
http-x-requested-with: com.xooloo.internet
-
user_agent: Mozilla/5.0 (Linux; Android 12; vivo 1907 Build/SP1A.210812.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/102.0.5005.125 Mobile Safari/537.36U Browser1.1
client:
type: browser
name: U Browser
version: "1.1"
engine: Blink
engine_version: 102.0.5005.125
family: Chrome
headers:
http-x-requested-with: com.u_browser
7 changes: 7 additions & 0 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
###############

# U Browser (https://play.google.com/store/apps/details?id=com.u_browser)
- regex: '(.*)U Browser(\d+\.[\.\d]+)'
name: 'U Browser'
version: '$2'
engine:
default: 'Blink'

# Tesla Browser (https://www.teslabrowser.com/)
- regex: 'Chrome/(\d+\.[\.\d]+).+TeslaBrowser/'
name: 'Tesla Browser'
Expand Down
1 change: 1 addition & 0 deletions regexes/client/hints/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,4 @@
'com.appssppa.idesktoppcbrowser': 'iDesktop PC Browser'
'pi.browser': 'Pi Browser'
'com.xooloo.internet': 'Xooloo Internet'
'com.u_browser': 'U Browser'

0 comments on commit dc6e544

Please sign in to comment.