Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds detection for Pocket Internet Explorer browsers, smzdm, Zite apps and improves detection for Motorola Internet Browser, Safari, YouTube, YunOS #7985

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
5 changes: 3 additions & 2 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ class Browser extends AbstractClientParser
'PP' => 'Oppo Browser',
'P6' => 'Opus Browser',
'PR' => 'Palm Pre',
'2E' => 'Pocket Internet Explorer',
'7I' => 'Puffin Cloud Browser',
'6I' => 'Puffin Incognito Browser',
'PU' => 'Puffin Secure Browser',
Expand Down Expand Up @@ -783,7 +784,7 @@ class Browser extends AbstractClientParser
'FP', 'AD', '2I', 'P9', 'KJ', 'WY', 'VK', 'W5',
'7C', 'N7', 'W7',
],
'Internet Explorer' => ['IE', 'CZ', 'BZ', 'IM', 'PS', '3A', '4A', 'RN'],
'Internet Explorer' => ['IE', 'CZ', 'BZ', 'IM', 'PS', '3A', '4A', 'RN', '2E'],
'Konqueror' => ['KO'],
'NetFront' => ['NF'],
'NetSurf' => ['NE'],
Expand Down Expand Up @@ -822,7 +823,7 @@ class Browser extends AbstractClientParser
'DP', 'KL', 'K4', 'N6', 'KU', 'WK', 'M8', 'UP', 'ZT',
'9P', 'N8', 'VR', 'N9', 'M9', 'F9', '0P', '0A', '2F',
'2M', 'K7', '1N', '8A', 'H7', 'X3', 'X4', '5O', '6I',
'7I', 'X5', '3P',
'7I', 'X5', '3P', '2E',
];

/**
Expand Down
45 changes: 45 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10408,3 +10408,48 @@
engine: WebKit
engine_version: ""
family: Safari
-
user_agent: Mozilla/5.0 (MotorolaWebKit; U; /Windows CE 7.0) AppleWebKit/534.51 (KHTML, like Gecko) Version/2.3.0 Mobile Safari/534.51
client:
type: browser
name: Motorola Internet Browser
version: 2.3.0
engine: WebKit
engine_version: "534.51"
family: ""
-
user_agent: Mozilla/1.1 (compatible; MSPIE 2.0; Windows CE)
client:
type: browser
name: Pocket Internet Explorer
version: "2.0"
engine: Trident
engine_version: ""
family: Internet Explorer
-
user_agent: Microsoft Pocket Internet Explorer/0.6
client:
type: browser
name: Pocket Internet Explorer
version: "0.6"
engine: Trident
engine_version: ""
family: Internet Explorer
-
user_agent: Mozilla/5.0 (Linux; U; Android 1.5.2.0-RT-20120926.155001; xx; K-Touch W619 Build/AliyunOs-2012) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 SogouMSE,SogouMobileBrowser/2.1.0
client:
type: browser
name: Sogou Mobile Browser
version: 2.1.0
engine: WebKit
engine_version: "534.30"
family: Safari
-
user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)
client:
type: browser
name: Safari
version: ""
engine: WebKit
engine_version: 605.1.15
family: Safari
12 changes: 12 additions & 0 deletions Tests/Parser/Client/fixtures/mobile_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2369,3 +2369,15 @@
type: mobile app
name: Apache
version: 2.4.34
-
user_agent: com.google.ios.youtube/17.39.4 (iPad4,2; U; CPU iOS 12_5_7 like Mac OS X; zh-Hans_US)
client:
type: mobile app
name: YouTube
version: 17.39.4
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 7_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D167 iPhone6,1/N51AP Zite/2.6
client:
type: mobile app
name: Zite
version: "2.6"
8 changes: 8 additions & 0 deletions Tests/Parser/fixtures/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5981,3 +5981,11 @@
version: 18.2.1
platform: ""
family: iOS
-
user_agent: Mozilla/5.0 (Linux; U; Android 1.5.2.0-RT-20120926.155001; xx; K-Touch W619 Build/AliyunOs-2012) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 SogouMSE,SogouMobileBrowser/2.1.0
os:
name: YunOS
short_name: YNS
version: 1.5.2.0
platform: ""
family: Android
10 changes: 4 additions & 6 deletions Tests/fixtures/phablet-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3600,17 +3600,15 @@
version: 17.1.1
platform: ""
client:
type: browser
name: Mobile Safari
version: ""
engine: WebKit
engine_version: 605.1.15
type: mobile app
name: smzdm
version: 10.6.20
device:
type: phablet
brand: Apple
model: iPhone 13 Pro
os_family: iOS
browser_family: Safari
browser_family: Unknown
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_0_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 QQ/9.0.17.638 V1_IPH_SQ_9.0.17_1_APP_A Pixel/1284 SimpleUISwitch/0 StudyMode/0 CurrentMode/0 CurrentFontScale/1.000000 QQTheme/1102 AppId/537203242 Core/WKWebView Device/Apple(iPhone 14 Plus) NetType/WIFI QBWebViewType/1 WKType/1
os:
Expand Down
10 changes: 4 additions & 6 deletions Tests/fixtures/smartphone-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -859,17 +859,15 @@
version: "7.1"
platform: ""
client:
type: browser
name: Mobile Safari
version: ""
engine: WebKit
engine_version: 537.51.2
type: mobile app
name: Zite
version: "2.6"
device:
type: smartphone
brand: Apple
model: iPhone 5S
os_family: iOS
browser_family: Safari
browser_family: Unknown
-
user_agent: Mozilla/5.0 (iPhone 5SGLOBAL; CPU iPhone OS 7_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/6.0 MQQBrowser/5.0.5 Mobile/11D167 Safari/8536.25
os:
Expand Down
10 changes: 4 additions & 6 deletions Tests/fixtures/smartphone-37.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8698,17 +8698,15 @@
version: 14.7.1
platform: ""
client:
type: browser
name: Mobile Safari
version: ""
engine: WebKit
engine_version: 605.1.15
type: mobile app
name: smzdm
version: 10.6.20
device:
type: smartphone
brand: Apple
model: iPhone 11
os_family: iOS
browser_family: Safari
browser_family: Unknown
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 QQ/8.9.85.608 V1_IPH_SQ_8.9.85_1_APP_A Pixel/1080 MiniAppEnable SimpleUISwitch/0 StudyMode/0 CurrentMode/0 CurrentFontScale/1.117647 QQTheme/1000 AppId/537179600 Core/WKWebView Device/Apple(iPhone 13 mini) NetType/WIFI QBWebViewType/1 WKType/1
os:
Expand Down
4 changes: 2 additions & 2 deletions Tests/fixtures/smartphone-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5095,7 +5095,7 @@
platform: ""
client:
type: browser
name: Mobile Safari
name: Motorola Internet Browser
version: 2.3.0
engine: WebKit
engine_version: "534.51"
Expand All @@ -5104,7 +5104,7 @@
brand: Motorola
model: ""
os_family: Windows Mobile
browser_family: Safari
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; U; Android 2.2; fr-fr; MotoA953 Build/MILS2_U6_2.3.4) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
os:
Expand Down
10 changes: 4 additions & 6 deletions Tests/fixtures/tablet-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -636,17 +636,15 @@
version: 12.5.7
platform: ""
client:
type: browser
name: Mobile Safari
version: ""
engine: WebKit
engine_version: ""
type: mobile app
name: YouTube
version: 17.39.4
device:
type: tablet
brand: Apple
model: iPad Air
os_family: iOS
browser_family: Safari
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPad; CPU OS 12_5_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 LightSpeed [FBAN/MessengerLiteForiOS;FBAV/358.0.0.12.127;FBBV/365620646;FBDV/iPad4,3;FBMD/iPad;FBSN/iOS;FBSV/12.5.5;FBSS/2;FBCR/;FBID/tablet;FBLC/vi;FBOP/0]'
os:
Expand Down
13 changes: 12 additions & 1 deletion regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
version: '$1'

# Motorola Internet Browser
- regex: 'MIB/(\d+[.\d]+)'
- regex: '(?:MIB|MotorolaWebKit.*Version)/(\d+[.\d]+)'
name: 'Motorola Internet Browser'
version: '$1'

Expand Down Expand Up @@ -3172,6 +3172,12 @@
version: '$1'
engine:
default: 'Trident'
# Pocket Internet Explorer
- regex: '(?:MSPIE|Pocket Internet Explorer)[ /](\d+[.\d]+)'
name: 'Pocket Internet Explorer'
version: '$1'
engine:
default: 'Trident'

#Kindle Browser
- regex: 'Kindle/(\d+[.\d]+)'
Expand Down Expand Up @@ -3365,6 +3371,11 @@
version: '$1'
engine:
default: 'WebKit'
- regex: 'Macintosh'
name: 'Safari'
version: ''
engine:
default: 'WebKit'

# Dorado
- regex: '(?:\w{1,5}[_ ])?Dorado(?: WAP-Browser)?(?:[/ ]?(\d+[.\d]+))?'
Expand Down
12 changes: 11 additions & 1 deletion regexes/client/mobile_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
version: ''

# YouTube
- regex: 'com\.google\.android\.youtube(?:/([\d.]+))?'
- regex: 'com\.google\.(?:android|ios)\.youtube(?:/([\d.]+))?'
name: 'YouTube'
version: '$1'
- regex: 'YouTube/([\d.]+)[JK]'
Expand Down Expand Up @@ -2661,6 +2661,16 @@
name: 'Apache'
version: '$1'

# smzdm (https://www.smzdm.com/)
- regex: 'smzdm ([\d.]+)'
name: 'smzdm'
version: '$1'

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

# Electron generic apps
- regex: ' (?!(?:AppleWebKit|brave|Cypress|Franz|Mailspring|Notion|Basecamp|Evernote|catalyst|ramboxpro|BlueMail|BeakerBrowser|Dezor|TweakStyle|Colibri|Polypane|Singlebox|Skye|VibeMate|(?:d|LT|Glass|Sushi|Flash|OhHai)Browser|Sizzy))([a-z0-9]*)(?:-desktop|-electron-app)?/(\d+\.[\d.]+).*Electron/'
name: '$1'
Expand Down
4 changes: 4 additions & 0 deletions regexes/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@
##########
# YunOS (Android based)
##########
- regex: 'Android (\d+[.\d]+)-RT'
name: 'YunOS'
version: '$1'

- regex: '(?:Ali)?YunOS[ /]?(\d+[.\d]+)?'
name: 'YunOS'
version: '$1'
Expand Down
Loading