Skip to content

Commit

Permalink
feat(device) detect new brand Transpeed models: TR99 Mini Plus, TR99, 6K
Browse files Browse the repository at this point in the history
feat(device) detect brand Asus model: ZenFone 2E
feat(device) detect brand CUBOT model: Quest Lite
feat(device) detect brand Teclast models: P80X EEA, P80X ROW
feat(device) detect brand Hotwav model: Pearl K2
feat(device) detect brand Nextbit model: Robin
feat(device) detect brand model: WinWin
feat(device) detect brand Kazam model: Thunder 450W
feat(device) detect brand Anry models: X20, S20

issue matomo-org#6355
  • Loading branch information
sanchezzzhak committed Oct 16, 2020
1 parent a6834d9 commit 84b02b8
Show file tree
Hide file tree
Showing 3 changed files with 289 additions and 7 deletions.
1 change: 1 addition & 0 deletions Parser/Device/DeviceParserAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@ abstract class DeviceParserAbstract extends ParserAbstract
'TA' => 'Tesla',
'TK' => 'Takara',
'4T' => 'Tronsmart',
'5R' => 'Transpeed',
'T5' => 'TB Touch',
'TC' => 'TCL',
'T7' => 'Teclast',
Expand Down
261 changes: 261 additions & 0 deletions Tests/fixtures/smartphone-18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3000,3 +3000,264 @@
model: V5 5G
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 5.0.1; ASUS ZenFone 2E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 5.0.1
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: smartphone
brand: AU
model: ZenFone 2E
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 9; QUEST LITE) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "9"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: smartphone
brand: CB
model: Quest Lite
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 9; P80X_EEA) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Safari/537.36
os:
name: Android
short_name: AND
version: "9"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: tablet
brand: T7
model: P80X EEA
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 9; P80X_ROW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Safari/537.36
os:
name: Android
short_name: AND
version: "9"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: tablet
brand: T7
model: P80X ROW
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 9; Pearl K2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "9"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 76.0.3809.132
engine: Blink
engine_version: ""
device:
type: smartphone
brand: HV
model: Pearl K2
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 9; Robin) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.92 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "9"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 77.0.3865.92
engine: Blink
engine_version: ""
device:
type: smartphone
brand: N2
model: Robin
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 9; TR99 MINI+) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.96 Safari/537.36
os:
name: Android
short_name: AND
version: "9"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 78.0.3904.96
engine: Blink
engine_version: ""
device:
type: tv
brand: 5R
model: TR99 Mini Plus
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 9; TR99) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.90 Safari/537.36
os:
name: Android
short_name: AND
version: "9"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 78.0.3904.90
engine: Blink
engine_version: ""
device:
type: tv
brand: 5R
model: TR99
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 9; Transpeed_6K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.136 Safari/537.36
os:
name: Android
short_name: AND
version: "9"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.136
engine: Blink
engine_version: ""
device:
type: tv
brand: 5R
model: 6K
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; HIGHSCREEN; WinWin) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537 UCBrowser/4.2.1.541 Mobile
os:
name: Windows Phone
short_name: WPH
version: "8.1"
platform: ARM
client:
type: browser
name: UC Browser
short_name: UC
version: 4.2.1.541
engine: Trident
engine_version: "7.0"
device:
type: smartphone
brand: H2
model: WinWin
os_family: Windows Mobile
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; KAZAM; Thunder 450W) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537
os:
name: Windows Phone
short_name: WPH
version: "8.1"
platform: ARM
client:
type: browser
name: IE Mobile
short_name: IM
version: "11.0"
engine: Trident
engine_version: "7.0"
device:
type: smartphone
brand: KZ
model: Thunder 450W
os_family: Windows Mobile
browser_family: Internet Explorer
-
user_agent: Mozilla/5.0 (Linux; Android 9.0; ANRY-X20) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Safari/537.36
os:
name: Android
short_name: AND
version: "9.0"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: tablet
brand: 7A
model: X20
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 9.0; ANRY-S20) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.116 Safari/537.36
os:
name: Android
short_name: AND
version: "9.0"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.116
engine: Blink
engine_version: ""
device:
type: tablet
brand: 7A
model: S20
os_family: Android
browser_family: Chrome

34 changes: 27 additions & 7 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2048,6 +2048,8 @@ Asus:
model: 'ZenFone Max M2'
- regex: '(?:ASUS_)?(?:Z00[AD]|Z008D|Z008|Z00AD[AB]?)'
model: 'ZenFone 2'
- regex: '(?:ASUS_)?(?:ZenFone 2E)'
model: 'ZenFone 2E'
- regex: '(?:ASUS_)?A007|ZA550KL|ZB553KL|ZB501KL'
model: 'ZenFone Live'
- regex: '(?:ASUS_)?(X00RD|G552KL)'
Expand Down Expand Up @@ -3647,7 +3649,7 @@ Cube:

# CUBOT
CUBOT:
regex: 'CUBOT|RAINBOW 2|KING_KONG_3|KINGKONG_MINI'
regex: 'CUBOT|RAINBOW 2|KING_KONG_3|KINGKONG_MINI|QUEST LITE'
device: 'smartphone'
models:
- regex: 'CHEETAH 2'
Expand All @@ -3664,6 +3666,8 @@ CUBOT:
model: 'King Kong 3'
- regex: 'KING KONG'
model: 'King Kong'
- regex: 'QUEST LITE'
model: 'Quest Lite'
- regex: 'CUBOT[ _]Echo'
model: 'Echo'
- regex: 'CUBOT[ _]MANITO'
Expand Down Expand Up @@ -7069,11 +7073,13 @@ Kaan:

# Kazam
Kazam:
regex: 'Kazam ([^;/)]+)( Build|\))|Trooper_X[0-9][0-9][);/ ]|Tornado 348'
regex: 'Kazam[);/ ]|Trooper_X[0-9][0-9][);/ ]|Tornado 348'
device: 'smartphone'
models:
- regex: 'Tornado 348'
model: 'Tornado 348'
- regex: 'Thunder 450W'
model: 'Thunder 450W'
- regex: 'Trooper_X([0-9])([0-9])[);/ ]'
model: 'Trooper X$1.$2'
- regex: 'Kazam ([^;/)]+)(?: Build|\))'
Expand Down Expand Up @@ -9406,7 +9412,7 @@ Neffos:

# Nextbit
Nextbit:
regex: '(Robin) Build'
regex: '(Robin)(?: Build|\))'
device: 'smartphone'
model: '$1'

Expand Down Expand Up @@ -12768,7 +12774,7 @@ TCL:

# Teclast
Teclast:
regex: 'Teclast|X98 Air III|X98 Air II\(HG5N\)|Tbook|X80 Power\(B2N4\)|T30_(ROW|EEA)|T10\(E3C6\)|P10S\(N4H5\)|98\(M1E[45789]\)|98\(M3E3\)'
regex: 'Teclast|X98 Air III|X98 Air II\(HG5N\)|Tbook|X80 Power\(B2N4\)|(?:T30|P80X)_(ROW|EEA)|T10\(E3C6\)|P10S\(N4H5\)|98\(M1E[45789]\)|98\(M3E3\)'
device: 'tablet'
models:
- regex: 'Tbook[_ -]([^;/]+) Build'
Expand All @@ -12777,6 +12783,8 @@ Teclast:
model: 'T10'
- regex: 'T30_(ROW|EEA)'
model: 'T30 $1'
- regex: 'P80X_(ROW|EEA)'
model: 'P80X $1'
- regex: 'P10S\(N4H5\)'
model: 'P10S'
- regex: '98\(M1E[45789]\)|98\(M3E3\)'
Expand Down Expand Up @@ -15706,6 +15714,8 @@ Highscreen:
model: 'Zera S Power'
- regex: 'Tasty[;)/ ]'
model: 'Tasty'
- regex: 'WinWin[;)/ ]'
model: 'WinWin'

# CVTE
CVTE:
Expand Down Expand Up @@ -16614,7 +16624,7 @@ Lesia:

# Anry
Anry:
regex: 'ANRY-(RS10)[);/ ]'
regex: 'ANRY-(RS10|[SX]20)[);/ ]'
device: 'tablet'
model: '$1'

Expand Down Expand Up @@ -17016,7 +17026,7 @@ Sunstech:

# Hotwav
Hotwav:
regex: '(Venus[_ ]X1[024569])[);/ ]'
regex: '(Venus[_ ]X1[024569]|Pearl K2)[);/ ]'
device: 'smartphone'
model: '$1'

Expand Down Expand Up @@ -17172,4 +17182,14 @@ Fero:
- regex: 'Fero_Y1'
model: 'Y1'
- regex: 'Royale_X2'
model: 'Royale X2'
model: 'Royale X2'

# Transpeed
Transpeed:
regex: 'Transpeed_|(?:TR99 MINI\+|TR99)[);/ ]'
device: 'tv'
models:
- regex: 'TR99 MINI\+'
model: 'TR99 Mini Plus'
- regex: '(?:Transpeed_)?(TR99|6K)[);/ ]'
model: '$1'

0 comments on commit 84b02b8

Please sign in to comment.