Skip to content

Commit

Permalink
Adds detection for AltiBrowser, Maple (browser and engine) and improv…
Browse files Browse the repository at this point in the history
…es detection for Tizen (#7975)

* Adds detection for Maple browser and engine
* Improves detection for Tizen
* Adds detection for AltiBrowser
  • Loading branch information
liviuconcioiu authored Jan 9, 2025
1 parent bffd0ff commit 0e536c0
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 30 deletions.
2 changes: 2 additions & 0 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class Browser extends AbstractClientParser
'AL' => 'Aloha Browser',
'AH' => 'Aloha Browser Lite',
'A8' => 'ALVA',
'9A' => 'AltiBrowser',
'AM' => 'Amaya',
'A3' => 'Amaze Browser',
'A5' => 'Amerigo',
Expand Down Expand Up @@ -391,6 +392,7 @@ class Browser extends AbstractClientParser
'LX' => 'Lynx',
'L2' => 'Lynket Browser',
'MD' => 'Mandarin',
'MP' => 'Maple',
'M5' => 'MarsLab Web Browser',
'M7' => 'MaxBrowser',
'M1' => 'mCent',
Expand Down
1 change: 1 addition & 0 deletions Parser/Client/Browser/Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class Engine extends AbstractClientParser
'EkiohFlow',
'Arachne',
'LibWeb',
'Maple',
];

/**
Expand Down
18 changes: 18 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10372,3 +10372,21 @@
family: Chrome
headers:
Sec-CH-UA: '"Chromium";v="122", "Not(A:Brand";v="24", "Herond";v="122"'
-
user_agent: Mozilla/5.0 (Windows; U; en-US; rv:1.8.1.11; Gecko/20071129; Firefox/2.5.0) Maple 6.0.00077
client:
type: browser
name: Maple
version: 6.0.00077
engine: Maple
engine_version: 6.0.00077
family: ""
-
user_agent: Mozilla/5.0 (Linux; olleh tv; U; xx; SMT-E5015) AppleWebKit/536.25 (KHTML, like Gecko) AltiBrowser/3.0.4 (olleh tv; Large Screen) Safari/536.25
client:
type: browser
name: AltiBrowser
version: 3.0.4
engine: WebKit
engine_version: "536.25"
family: ""
12 changes: 6 additions & 6 deletions Tests/fixtures/tv-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4789,21 +4789,21 @@
-
user_agent: Mozilla/5.0 (SmartHub; SMART-TV; U; Linux/SmartTV+2013; Maple2012) AppleWebKit/535.20+ (KHTML, like Gecko) SmartTV Safari/535.20+ SamsungTV/T-MST14AKUC-0407.0 (Samsung, UN40H6400, Wired)
os:
name: GNU/Linux
name: Tizen
version: ""
platform: ""
client:
type: browser
name: Safari
name: Maple
version: ""
engine: WebKit
engine_version: "535.20"
engine: Maple
engine_version: "2012"
device:
type: tv
brand: Samsung
model: UN40H6400
os_family: GNU/Linux
browser_family: Safari
os_family: Other Mobile
browser_family: Unknown
-
user_agent: 'Opera/9.80 NETTV/4.5.0 Mozilla/5.0 (Linux armv7i; CE-HTML/1.0; U; en) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36 Tbrowser/2.0 _TV_/V8-S586T02-LF1V425 (TCL,U65P60*6,wired)'
os:
Expand Down
69 changes: 46 additions & 23 deletions Tests/fixtures/tv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4307,19 +4307,22 @@
browser_family: Chrome
-
user_agent: Mozilla/4.0 (compatible; Gecko/20041115) Maple 5.0.0 Navi
os: [ ]
os:
name: Tizen
version: ""
platform: ""
client:
type: browser
name: Firefox
version: ""
engine: Gecko
engine_version: ""
name: Maple
version: 5.0.0
engine: Maple
engine_version: 5.0.0
device:
type: tv
brand: Samsung
model: ""
os_family: Unknown
browser_family: Firefox
os_family: Other Mobile
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.2.2; ru-ru; GT-B9150 Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
os:
Expand All @@ -4341,15 +4344,20 @@
-
user_agent: Mozilla/5.0 (SmartHub; SMART-TV; U; Linux/SmartTV; Maple2012)
os:
name: GNU/Linux
name: Tizen
version: ""
platform: ""
client: null
client:
type: browser
name: Maple
version: ""
engine: Maple
engine_version: "2012"
device:
type: tv
brand: Samsung
model: Smart TV (2012)
os_family: GNU/Linux
os_family: Other Mobile
browser_family: Unknown
-
user_agent: Mozilla/5.0 (SMART-TV; X11; Linux i686) AppleWebKit/535.20+ (KHTML, like Gecko) Version/5.0 Safari/535.20+
Expand Down Expand Up @@ -4389,47 +4397,62 @@
browser_family: Chrome
-
user_agent: HbbTV/1.1.1 (;;;;;) Maple_2011
os: [ ]
os:
name: Tizen
version: ""
platform: ""
client: null
device:
type: tv
brand: Samsung
model: Smart TV (2011)
os_family: Unknown
os_family: Other Mobile
browser_family: Unknown
-
user_agent: HbbTV/1.1.1 (;Samsung;SmartTV2012;;;) WebKit
os: [ ]
os:
name: Tizen
version: ""
platform: ""
client: null
device:
type: tv
brand: Samsung
model: Smart TV (2012)
os_family: Unknown
os_family: Other Mobile
browser_family: Unknown
-
user_agent: HbbTV/1.1.1 (;Samsung;SmartTV2013;BPH-F8509EUB-1003.2;;) WebKit
os: [ ]
os:
name: Tizen
version: ""
platform: ""
client: null
device:
type: tv
brand: Samsung
model: Smart TV (2013)
os_family: Unknown
os_family: Other Mobile
browser_family: Unknown
-
user_agent: HbbTV/1.1.1 (;Samsung;SmartTV2014;T-MST14DEUC-1106.1;;) WebKit
os: [ ]
os:
name: Tizen
version: ""
platform: ""
client: null
device:
type: tv
brand: Samsung
model: Smart TV (2014)
os_family: Unknown
os_family: Other Mobile
browser_family: Unknown
-
user_agent: HbbTV/1.2.1 (+DRM;Samsung;SmartTV2017;T-KTMDEUC-1151.1;;)+TVPLUS+SmartHubLink Chrome
os: [ ]
os:
name: Tizen
version: ""
platform: ""
client:
type: browser
name: Chrome
Expand All @@ -4440,7 +4463,7 @@
type: tv
brand: Samsung
model: Smart TV (2017)
os_family: Unknown
os_family: Other Mobile
browser_family: Chrome
-
user_agent: SmartTV/1.0.0 (SAMSUNG;OTV-SMT-E5015;0x01;BAC.2012.05.12)
Expand All @@ -4460,16 +4483,16 @@
platform: ""
client:
type: browser
name: Safari
version: ""
name: AltiBrowser
version: 3.0.4
engine: WebKit
engine_version: "536.25"
device:
type: tv
brand: Samsung
model: SMT-E5015
os_family: GNU/Linux
browser_family: Safari
browser_family: Unknown
-
user_agent: DLNADOC/1.50 SHARP-AQUOS-DMP/2.0W
os: [ ]
Expand Down
3 changes: 3 additions & 0 deletions regexes/client/browser_engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@

- regex: 'LibWeb\+LibJs'
name: 'LibWeb'

- regex: 'Maple (?!III)(\d+[.\d]+)|Maple\d{4}'
name: 'Maple'
14 changes: 14 additions & 0 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
###############

# AltiBrowser (http://www.alticast.co.kr/)
- regex: 'AltiBrowser/([\d.]+)'
name: 'AltiBrowser'
version: '$1'
engine:
default: 'WebKit'

# Maple (https://developer.samsung.com/)
- regex: 'Maple (?!III)(\d+[.\d]+)|Maple\d{4}'
name: 'Maple'
version: '$1'
engine:
default: 'Maple'

# Singlebox (https://singlebox.app/en/)
- regex: 'Singlebox/(\d+\.[\.\d]+)'
name: 'Singlebox'
Expand Down
6 changes: 5 additions & 1 deletion regexes/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,16 @@
version: ''

##########
# Tizen
# Tizen (https://www.tizen.org/)
##########
- regex: 'Tizen[ /]?(\d+[.\d]+)?'
name: 'Tizen'
version: '$1'

- regex: 'Maple (?!III)(?:\d+[.\d]+)|Maple_?\d{4}|HbbTV/.+Samsung'
name: 'Tizen'
version: ''

##########
# YunOS (Android based)
##########
Expand Down

0 comments on commit 0e536c0

Please sign in to comment.