From 13a3efadc4b7362797f0f8fe80be6939d0555bd0 Mon Sep 17 00:00:00 2001 From: sanchezzzhak Date: Tue, 21 Nov 2023 20:30:35 +0300 Subject: [PATCH] feat(browser): detect World Browser - Fast & Simple feat(browser): detect Every Browser ref #7039 --- Parser/Client/Browser.php | 10 ++++++++++ Parser/OperatingSystem.php | 5 ++++- Tests/Parser/Client/fixtures/browser.yml | 22 ++++++++++++++++++++++ Tests/fixtures/unknown.yml | 20 ++++++++++++++++++++ regexes/client/hints/browsers.yml | 2 ++ 5 files changed, 58 insertions(+), 1 deletion(-) diff --git a/Parser/Client/Browser.php b/Parser/Client/Browser.php index c3bdcc3d15..5324eac2eb 100644 --- a/Parser/Client/Browser.php +++ b/Parser/Client/Browser.php @@ -201,6 +201,7 @@ class Browser extends AbstractClientParser 'DD' => 'DuckDuckGo Privacy Browser', 'EC' => 'Ecosia', 'EW' => 'Edge WebView', + 'EV' => 'Every Browser', 'EI' => 'Epic', 'EL' => 'Elinks', 'EN' => 'EinkBro', @@ -538,6 +539,7 @@ class Browser extends AbstractClientParser 'WH' => 'Whale Browser', 'WO' => 'wOSBrowser', 'WT' => 'WeTab Browser', + '1W' => 'World Browser - Fast & Simple', 'WL' => 'Wolvic', 'YG' => 'YAGI', 'YJ' => 'Yahoo! Japan Browser', @@ -601,6 +603,7 @@ class Browser extends AbstractClientParser 'F4', 'YG', 'WR', 'NA', 'DM', '1M', 'A7', 'XN', 'XT', 'XB', 'W1', 'HT', 'B8', 'F5', 'B9', 'WA', 'T0', 'HC', 'O6', 'P7', 'LJ', 'LC', 'O7', 'N2', 'A8', 'P8', 'RB', + '1W', 'EV', ], 'Firefox' => [ 'AX', 'BI', 'BF', 'BH', 'BN', 'C0', 'CU', 'EI', 'F1', @@ -639,6 +642,7 @@ class Browser extends AbstractClientParser 'B5', 'B6', 'TC', 'A6', '2X', 'F4', 'YG', 'WR', 'NA', 'DM', '1M', 'A7', 'XN', 'XT', 'XB', 'W1', 'HT', 'B7', 'B9', 'T0', 'I8', 'O6', 'P7', 'O8', '4B', 'A8', 'P8', + '1W', 'EV', ]; /** @@ -878,6 +882,12 @@ public function parse(): ?array if ('Blink' === $engine && 'Flow Browser' === $name) { $engineVersion = ''; } + // the browser simulate ua for Android OS + if ('Every Browser' === $name) { + $family = 'Chrome'; + $engine = 'Blink'; + $engineVersion = ''; + } return [ 'type' => 'browser', diff --git a/Parser/OperatingSystem.php b/Parser/OperatingSystem.php index c39289c5af..4929fc05f0 100644 --- a/Parser/OperatingSystem.php +++ b/Parser/OperatingSystem.php @@ -334,7 +334,10 @@ public function parse(): ?array $platform = $this->parsePlatform(); $family = self::getOsFamily($short); - $androidApps = ['com.hisense.odinbrowser', 'com.seraphic.openinet.pre', 'com.appssppa.idesktoppcbrowser']; + $androidApps = [ + 'com.hisense.odinbrowser', 'com.seraphic.openinet.pre', 'com.appssppa.idesktoppcbrowser', + 'every.browser.inc' + ]; if (null !== $this->clientHints) { if (\in_array($this->clientHints->getApp(), $androidApps) && 'Android' !== $name) { diff --git a/Tests/Parser/Client/fixtures/browser.yml b/Tests/Parser/Client/fixtures/browser.yml index 017ebe1812..6d432d2ff7 100644 --- a/Tests/Parser/Client/fixtures/browser.yml +++ b/Tests/Parser/Client/fixtures/browser.yml @@ -7639,3 +7639,25 @@ engine: Blink engine_version: 84.0.4147.38 family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 10; SM-J600G Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/81.0.4044.138 Mobile Safari/537.36 + client: + type: browser + name: World Browser - Fast & Simple + version: "" + engine: Blink + engine_version: 81.0.4044.138 + family: Chrome + headers: + http-x-requested-with: com.browser.elmurzaev +- + user_agent: Mozilla/5.0 (iPad; CPU OS 13_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Mobile/15E148 Safari/604.1 + client: + type: browser + name: Every Browser + version: "" + engine: Blink + engine_version: "" + family: Chrome + headers: + http-x-requested-with: every.browser.inc diff --git a/Tests/fixtures/unknown.yml b/Tests/fixtures/unknown.yml index ee126c6fc7..ecb52309ec 100644 --- a/Tests/fixtures/unknown.yml +++ b/Tests/fixtures/unknown.yml @@ -3285,3 +3285,23 @@ model: X98 S500 os_family: Android browser_family: Unknown +- + user_agent: Mozilla/5.0 (iPad; CPU OS 13_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Mobile/15E148 Safari/604.1 + os: + name: Android + version: "" + platform: "" + client: + type: browser + name: Every Browser + version: "" + engine: Blink + engine_version: "" + device: + type: "" + brand: "" + model: "" + os_family: Android + browser_family: Chrome + headers: + http-x-requested-with: every.browser.inc diff --git a/regexes/client/hints/browsers.yml b/regexes/client/hints/browsers.yml index c5fe8f2109..12ae09247b 100644 --- a/regexes/client/hints/browsers.yml +++ b/regexes/client/hints/browsers.yml @@ -208,3 +208,5 @@ 'com.opera.mini.native.beta': 'Opera Mini' 'com.sec.android.app.sbrowser': 'Samsung Browser' 'com.sec.android.app.sbrowser.lite': 'Samsung Browser Lite' +'com.browser.elmurzaev': 'World Browser - Fast & Simple' +'every.browser.inc': 'Every Browser'