Skip to content

Commit

Permalink
feat(device) detect new brand SQOOL models: V41, V4
Browse files Browse the repository at this point in the history
feat(device) detect new brand TurboKids models: TMNT, 3G
feat(device) detect brand Majestic model: Urano 77 LTE
feat(device) detect brand Turbo-X model: S3

issue matomo-org#6355
  • Loading branch information
sanchezzzhak committed Sep 7, 2020
1 parent 13e3a51 commit 750464f
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Parser/Device/DeviceParserAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ abstract class DeviceParserAbstract extends ParserAbstract
'S3' => 'SunVan',
'SZ' => 'Sumvision',
'SS' => 'SWISSMOBILITY',
'QS' => 'SQOOL',
'0W' => 'Swipe',
'10' => 'Simbans',
'X1' => 'Safaricom',
Expand Down Expand Up @@ -659,6 +660,7 @@ abstract class DeviceParserAbstract extends ParserAbstract
'TU' => 'Tunisie Telecom',
'TR' => 'Turbo-X',
'1T' => 'Turbo',
'5T' => 'TurboKids',
'11' => 'True',
'TV' => 'TVC',
'TW' => 'TWM',
Expand Down
141 changes: 141 additions & 0 deletions Tests/fixtures/smartphone-17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,144 @@
model: Smart 4G Gen C 5.5"
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 7.0; SQOOL-V41) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.89 Safari/537.36
os:
name: Android
short_name: AND
version: "7.0"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 76.0.3809.89
engine: Blink
engine_version: ""
device:
type: tablet
brand: QS
model: V41
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1.1; SQOOL-V4 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.109 Safari/537.36
os:
name: Android
short_name: AND
version: 5.1.1
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 65.0.3325.109
engine: Blink
engine_version: ""
device:
type: tablet
brand: QS
model: V4
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 7.0; URANO 77LTE Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.90 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "7.0"
platform: ""
client:
type: browser
name: Chrome Webview
short_name: CV
version: 78.0.3904.90
engine: Blink
engine_version: ""
device:
type: smartphone
brand: MJ
model: Urano 77 LTE
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 7.0; Turbox_S3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.92 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "7.0"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 77.0.3865.92
engine: Blink
engine_version: ""
device:
type: smartphone
brand: TR
model: S3
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 7.0; Turbokids-TMNT) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36
os:
name: Android
short_name: AND
version: "7.0"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.79
engine: Blink
engine_version: ""
device:
type: tablet
brand: 5T
model: TMNT
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 7.0; Turbokids3G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.136 Safari/537.36
os:
name: Android
short_name: AND
version: "7.0"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.136
engine: Blink
engine_version: ""
device:
type: tablet
brand: 5T
model: 3G
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.4; TurboKids S4 Build/KTU84Q) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.4
platform: ""
client:
type: browser
name: Chrome Webview
short_name: CV
version: 33.0.0.0
engine: Blink
engine_version: ""
device:
type: tablet
brand: 5T
model: S4
os_family: Android
browser_family: Chrome

20 changes: 18 additions & 2 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8195,9 +8195,11 @@ Mpman:

# Majestic
Majestic:
regex: 'MAJESTIC[ _-]|CRONO ?[0-9]+|TAB (?:647|411) 3G'
regex: 'MAJESTIC[ _-]|CRONO ?[0-9]+|TAB (?:647|411) 3G|URANO 77LTE'
device: 'smartphone'
models:
- regex: 'URANO 77LTE[);/ ]'
model: 'Urano 77 LTE'
- regex: 'TAB (647|411) 3G'
model: 'Tab $1 3G'
device: 'tablet'
Expand Down Expand Up @@ -11966,9 +11968,11 @@ Sendo:

# Turbo-X
Turbo-X:
regex: 'Turbo-X|Hive V 3G'
regex: 'Turbo-X|Hive V 3G|Turbox_S3'
device: 'smartphone'
models:
- regex: 'Turbox_S3'
model: 'S3'
- regex: 'Turbo-X Ice[);/ ]'
device: 'tablet'
model: 'Ice'
Expand Down Expand Up @@ -16217,3 +16221,15 @@ Klipad:
regex: '(KL-V905)[);/ ]'
device: 'smartphone'
model: '$1'

# SQOOL (sqool.fr)
SQOOL:
regex: 'SQOOL-V(41?)[);/ ]'
device: 'tablet'
model: 'V$1'

# TurboKids
TurboKids:
regex: 'Turbokids[-_ ]?(TMNT|3G|S4)[);/ ]'
device: 'tablet'
model: '$1'

0 comments on commit 750464f

Please sign in to comment.