From 2ea3108d8cdffd58d855eff3cc493c0acc4cf102 Mon Sep 17 00:00:00 2001 From: Tutik Alexsandr Date: Mon, 5 Jun 2017 23:44:38 +0300 Subject: [PATCH] Pr browsers1 (#5626) * new brand Homtom * Homtom detected models HT3 HT17 HT20 etc * issue #5609 detect polarity browsers * issue #5609 detect qupzilla browser * issue #5609 detect Dooble browser * issue #5609 detect epic browser * issue #5609 detect coast browser (only mobile ios) * issue #5609 detect qutebrowser browser * issue #5609 detect aloha browser browser (only mobile browser) * issue #5609 detect waterfox browser * issue #5609 detect iridium browser --- Parser/Client/Browser.php | 15 ++++- Tests/Parser/Client/fixtures/browser.yml | 81 ++++++++++++++++++++++++ regexes/client/browsers.yml | 49 ++++++++++++++ 3 files changed, 142 insertions(+), 3 deletions(-) diff --git a/Parser/Client/Browser.php b/Parser/Client/Browser.php index f743f23e8f..5a82dc67df 100644 --- a/Parser/Client/Browser.php +++ b/Parser/Client/Browser.php @@ -33,6 +33,7 @@ class Browser extends ClientParserAbstract 'AB' => 'ABrowse', 'AF' => 'ANT Fresco', 'AG' => 'ANTGalio', + 'AL' => 'Aloha Browser', 'AM' => 'Amaya', 'AO' => 'Amigo', 'AN' => 'Android Browser', @@ -52,6 +53,7 @@ class Browser extends ClientParserAbstract 'CA' => 'Camino', 'CC' => 'Coc Coc', 'CD' => 'Comodo Dragon', + 'C1' => 'Coast', 'CX' => 'Charon', 'CF' => 'Chrome Frame', 'CH' => 'Chrome', @@ -67,7 +69,9 @@ class Browser extends ClientParserAbstract 'DE' => 'Deepnet Explorer', 'DF' => 'Dolphin', 'DO' => 'Dorado', + 'DL' => 'Dooble', 'DI' => 'Dillo', + 'EI' => 'Epic', 'EL' => 'Elinks', 'EB' => 'Element Browser', 'EP' => 'GNOME Web', @@ -86,6 +90,7 @@ class Browser extends ClientParserAbstract 'IA' => 'Iceape', 'IB' => 'IBrowse', 'IC' => 'iCab', + 'I1' => 'Iridium', 'ID' => 'IceDragon', 'IV' => 'Isivioo', 'IW' => 'Iceweasel', @@ -141,8 +146,11 @@ class Browser extends ClientParserAbstract 'PA' => 'Palmscape', 'PX' => 'Phoenix', 'PO' => 'Polaris', + 'PT' => 'Polarity', 'PS' => 'Microsoft Edge', 'QQ' => 'QQ Browser', + 'QT' => 'Qutebrowser', + 'QZ' => 'QupZilla', 'RK' => 'Rekonq', 'RM' => 'RockMelt', 'SB' => 'Samsung Browser', @@ -166,6 +174,7 @@ class Browser extends ClientParserAbstract 'VI' => 'Vivaldi', 'VB' => 'Vision Mobile Browser', 'WE' => 'WebPositive', + 'WF' => 'Waterfox', 'WO' => 'wOSBrowser', 'WT' => 'WeTab Browser', 'YA' => 'Yandex Browser', @@ -182,8 +191,8 @@ class Browser extends ClientParserAbstract 'BlackBerry Browser' => array('BB'), 'Baidu' => array('BD', 'BS'), 'Amiga' => array('AV', 'AW'), - 'Chrome' => array('CH', 'BR', 'CC', 'CD', 'CM', 'CI', 'CF', 'CN', 'CR', 'CP', 'IR', 'RM', 'AO', 'TS', 'VI'), - 'Firefox' => array('FF', 'FE', 'FM', 'SX', 'FB', 'PX', 'MB'), + 'Chrome' => array('CH', 'BR', 'CC', 'CD', 'CM', 'CI', 'CF', 'CN', 'CR', 'CP', 'IR', 'RM', 'AO', 'TS', 'VI', 'PT'), + 'Firefox' => array('FF', 'FE', 'FM', 'SX', 'FB', 'PX', 'MB', 'EI', 'WF'), 'Internet Explorer' => array('IE', 'IM', 'PS'), 'Konqueror' => array('KO'), 'NetFront' => array('NF'), @@ -199,7 +208,7 @@ class Browser extends ClientParserAbstract * @var array */ protected static $mobileOnlyBrowsers = array( - '36', 'PU', 'SK', 'OI', 'DB', 'ST', 'BL', 'IV', 'FM' + '36', 'PU', 'SK', 'OI', 'DB', 'ST', 'BL', 'IV', 'FM', 'C1', 'AL' ); /** diff --git a/Tests/Parser/Client/fixtures/browser.yml b/Tests/Parser/Client/fixtures/browser.yml index eaca031e04..0183e5dfb5 100644 --- a/Tests/Parser/Client/fixtures/browser.yml +++ b/Tests/Parser/Client/fixtures/browser.yml @@ -1583,3 +1583,84 @@ version: "2.6" engine: engine_version: +- + user_agent: Mozilla/5.0 (Linux; U; Android 4.3; en-us; Nexus 4 Build/JOP24G) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/37.0.0.0 Mobile Polarity/6.0.0 Safari/534.30 + client: + type: browser + name: Polarity + short_name: PT + version: "6.0.0" + engine: WebKit + engine_version: 534.30 +- + user_agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.3 (KHTML, like Gecko) QupZilla/1.1.5 Safari/533.3 + client: + type: browser + name: QupZilla + short_name: QZ + version: "1.1.5" + engine: WebKit + engine_version: 533.3 +- + user_agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.34 (KHTML, like Gecko) Dooble/1.41 Safari/534.34 + client: + type: browser + name: Dooble + short_name: DL + version: "1.41" + engine: WebKit + engine_version: 534.34 +- + user_agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.10) Gecko/20101026 Epic/1.2 Firefox/3.6.10 + client: + type: browser + name: Epic + short_name: EI + version: "1.2" + engine: Gecko + engine_version: +- + user_agent: Mozilla/5.0 (iPad; CPU OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Coast/1.0.2.62956 Mobile/10B329 Safari/7534.48.3 + client: + type: browser + name: Coast + short_name: C1 + version: "1.0.2.62956" + engine: WebKit + engine_version: 536.26 +- + user_agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) qutebrowser/0.2.1 Safari/538.1 + client: + type: browser + name: Qutebrowser + short_name: QT + version: "0.2.1" + engine: WebKit + engine_version: 538.1 +- + user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Mobile/14A456 Safari/602.1 AlohaBrowser/1.4 + client: + type: browser + name: Aloha Browser + short_name: AL + version: "1.4" + engine: WebKit + engine_version: 602.1.50 +- + user_agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:30.0) Gecko/20100101 Waterfox/30.0 Firefox/30.0 + client: + type: browser + name: Waterfox + short_name: WF + version: "30.0" + engine: Gecko + engine_version: +- + user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Iridium/41.2 Safari/537.36 Chrome/41.0.2272.118 + client: + type: browser + name: Iridium + short_name: I1 + version: "41.2" + engine: WebKit + engine_version: 537.36 diff --git a/regexes/client/browsers.yml b/regexes/client/browsers.yml index 029af7503e..32d242a3e3 100644 --- a/regexes/client/browsers.yml +++ b/regexes/client/browsers.yml @@ -45,6 +45,25 @@ engine: default: 'Gecko' +# Waterfox +- regex: 'Waterfox(?:/(\d+[\.\d]+))?' + name: 'Waterfox' + version: '$1' + engine: + default: 'Gecko' + +#AlohaBrowser +- regex: 'AlohaBrowser(?:/(\d+[\.\d]+))?' + name: 'Aloha Browser' + version: '$1' + +#Epic +- regex: 'Epic(?:/(\d+[\.\d]+))?' + name: 'Epic' + version: '$1' + engine: + default: 'Gecko' + #Fennec (Firefox for mobile) - regex: 'Fennec(?:/(\d+[\.\d]+))?' name: 'Fennec' @@ -103,6 +122,11 @@ engine: default: 'Blink' +#Iridium +- regex: 'Iridium(?:/(\d+[\.\d]+))?' + name: 'Iridium' + version: '$1' + #Iceweasel - regex: 'Iceweasel(?:/(\d+[\.\d]+))?' name: 'Iceweasel' @@ -237,6 +261,21 @@ engine: default: '' # Mosaic in the first versions, then Gecko +#Polarity +- regex: '(?:Polarity)(?:[/ ](\d+[\.\d]+))?' + name: 'Polarity' + version: '$1' + +#QupZilla +- regex: '(?:QupZilla)(?:[/ ](\d+[\.\d]+))?' + name: 'QupZilla' + version: '$1' + +#Dooble +- regex: '(?:Dooble)(?:[/ ](\d+[\.\d]+))?' + name: 'Dooble' + version: '$1' + #Opera - regex: '(?:Opera Tablet.*Version|Opera/.+Opera Mobi.+Version|Mobile.+OPR)/(\d+[\.\d]+)' name: 'Opera Mobile' @@ -956,6 +995,16 @@ engine: default: 'WebKit' +#Coast +- regex: 'Coast(?:/(\d+[\.\d]+))?' + name: 'Coast' + version: '$1' + +#Qutebrowser +- regex: 'qutebrowser(?:/(\d+[\.\d]+))?' + name: 'Qutebrowser' + version: '$1' + #Safari - regex: '(?:(?:iPod|iPad|iPhone).+Version|MobileSafari)/(\d+[\.\d]+)' name: 'Mobile Safari'