Skip to content

Commit

Permalink
Pr browsers1 (#5626)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
sanchezzzhak authored and sgiehl committed Jun 5, 2017
1 parent 0d158ac commit 2ea3108
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -86,6 +90,7 @@ class Browser extends ClientParserAbstract
'IA' => 'Iceape',
'IB' => 'IBrowse',
'IC' => 'iCab',
'I1' => 'Iridium',
'ID' => 'IceDragon',
'IV' => 'Isivioo',
'IW' => 'Iceweasel',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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'),
Expand All @@ -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'
);

/**
Expand Down
81 changes: 81 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
49 changes: 49 additions & 0 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -103,6 +122,11 @@
engine:
default: 'Blink'

#Iridium
- regex: 'Iridium(?:/(\d+[\.\d]+))?'
name: 'Iridium'
version: '$1'

#Iceweasel
- regex: 'Iceweasel(?:/(\d+[\.\d]+))?'
name: 'Iceweasel'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 2ea3108

Please sign in to comment.