Skip to content

Commit

Permalink
feat(client) detect browsers: Jelly, Maxthon, Opera GX, Ecosia
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchezzzhak committed Mar 17, 2022
1 parent 0cc98ba commit 2989259
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 7 deletions.
1 change: 1 addition & 0 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ class Browser extends AbstractClientParser
'JB' => 'Japan Browser',
'JS' => 'Jasmine',
'JA' => 'JavaFX',
'JL' => 'Jelly',
'JI' => 'Jig Browser',
'JP' => 'Jig Browser Plus',
'JO' => 'Jio Browser',
Expand Down
82 changes: 82 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4999,3 +4999,85 @@
family: Chrome
headers:
X-Requested-With: com.oh.brop
-
user_agent: Mozilla/5.0 (Linux; Android 10; CPH2185 Build/QP1A.190711.020) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/97.0.4692.98 Mobile Safari/537.36 Maxthon/9000
client:
type: browser
name: Maxthon
version: ""
engine: Blink
engine_version: ""
family:
-
user_agent: Mozilla/5.0 (Linux; Android 10; CPH2185 Build/QP1A.190711.020) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/97.0.4692.98 Mobile Safari/537.36 Maxthon/9000
client:
type: browser
name: Maxthon
version: ""
engine: Blink
engine_version: ""
family:
-
user_agent: Mozilla/5.0 (Linux; Android 6.0; Redmi Pro Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/46.0.2490.76 Mobile Safari/537.36 MxBrowser/4.5.10.1300
client:
type: browser
name: Maxthon
version: 4.5.10.1300
engine: Blink
engine_version: ""
family:
-
user_agent: Mozilla/5.0 (Linux; Android 9; Mi A1 Build/PKQ1.180917.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/99.0.4844.48 Mobile Safari/537.36 Maxthon/9000
client:
type: browser
name: Maxthon
version: ""
engine: Blink
engine_version: ""
family:
headers:
X-Requested-With: com.mx.browser
-
user_agent: Mozilla/5.0 (Linux; Android 9; SM-G965F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/97.0.4692.98 Mobile Safari/537.36
client:
type: browser
name: Maxthon
version: ""
engine: Blink
engine_version: ""
family: Chrome
headers:
X-Requested-With: com.mx.browser
-
user_agent: Mozilla/5.0 (Linux; Android 10; SM-G975F Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/93.0.4577.82 Mobile Safari/537.36
client:
type: browser
name: Ecosia
version: ""
engine: Blink
engine_version: ""
family: Chrome
headers:
X-Requested-With: com.ecosia.android
-
user_agent: Mozilla/5.0 (Linux; Android 10; Xperia SP Build/QQ3A.200805.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.101 Mobile Safari/537.36
client:
type: browser
name: Jelly
version: ""
engine: Blink
engine_version: ""
family: Chrome
headers:
X-Requested-With: org.lineageos.jelly
-
user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Redmi 5 Plus Build/OPM1.171019.019) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.98 Mobile Safari/537.36 OPX/1.4
client:
type: browser
name: Opera GX
version: "1.4"
engine: Blink
engine_version: ""
family: Opera
headers:
X-Requested-With: com.opera.gx
4 changes: 2 additions & 2 deletions Tests/fixtures/smartphone-14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8212,8 +8212,8 @@
type: browser
name: Maxthon
version: "4.5.10.1300"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: ""
device:
type: smartphone
brand: Sony
Expand Down
4 changes: 2 additions & 2 deletions Tests/fixtures/smartphone-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3751,8 +3751,8 @@
type: browser
name: Maxthon
version: "4.5.5.2000"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: ""
device:
type: smartphone
brand: Fondi
Expand Down
11 changes: 8 additions & 3 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1592,7 +1592,7 @@
engine:
default: 'Blink'

#Midori
# Midori
- regex: 'Chrome.+Midori Browser/(\d+[\.\d]+)'
name: 'Midori'
version: '$1'
Expand All @@ -1610,13 +1610,18 @@
version: '$1'

#Maxthon
- regex: 'Chrome.+Maxthon(?:.+\(portable\))?/(\d+[\.\d]+)'
- regex: 'Chrome.+Maxthon/\d{4}'
name: 'Maxthon'
version: ''
engine:
default: 'Blink'
- regex: 'Chrome.+(?:MxBrowser|Maxthon)(?:.+\(portable\))?/(\d+\.[\.\d]+)'
name: 'Maxthon'
version: '$1'
engine:
default: 'WebKit'
versions:
'5.2': 'Blink'
'4.5': 'Blink'
- regex: '(?:Maxthon(?:%20Browser)?|MxBrowser(?:-inhouse|-iPhone)?|MXiOS)[ /](\d+[\.\d]+)?'
name: 'Maxthon'
version: '$1'
Expand Down
4 changes: 4 additions & 0 deletions regexes/client/hints/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@
'mobi.mgeek.TunnyBrowser': 'Dolphin' # Dolphin + AdBlock
'nextapp.atlas': 'Atlas'
'org.mozilla.rocket': 'Firefox Rocket' # Firefox Lite
'com.mx.browser': 'Maxthon'
'com.ecosia.android': 'Ecosia'
'org.lineageos.jelly': 'Jelly'
'com.opera.gx': 'Opera GX'

0 comments on commit 2989259

Please sign in to comment.