Skip to content

Commit

Permalink
feat(device) detect brand HTC models: J One (HTL22), J Butterfly (HTL23)
Browse files Browse the repository at this point in the history
feat(device) detect brand Explay models: Imperium 7 3G, Imperium 8 3G
feat(device) detect brand Jiayu models: G4/G5, G2F, G4, G4S, S2, G3S
feat(device) detect brand Ployer model: MOMO Mini 3GS

issue matomo-org#6355
  • Loading branch information
sanchezzzhak committed Aug 22, 2020
1 parent 1f14e9c commit a461afc
Show file tree
Hide file tree
Showing 2 changed files with 280 additions and 6 deletions.
262 changes: 261 additions & 1 deletion Tests/fixtures/smartphone-16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4978,4 +4978,264 @@
brand: HP
model: Slate 7 VoiceTab
os_family: Android
browser_family: Chrome
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; Imperium7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: tablet
brand: EX
model: Imperium 7 3G
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; Imperium8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: tablet
brand: EX
model: Imperium 8 3G
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; Jiayu G4_G5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 78.0.3904.108
engine: Blink
engine_version: ""
device:
type: smartphone
brand: JI
model: G4/G5
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; Jiayu G4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome Webview
short_name: CV
version: 30.0.0.0
engine: Blink
engine_version: ""
device:
type: smartphone
brand: JI
model: G4
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; Jiayu G4S) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: smartphone
brand: JI
model: G4S
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; JIAYU S2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.116 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 77.0.3865.116
engine: Blink
engine_version: ""
device:
type: smartphone
brand: JI
model: S2
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; Jiayu G2F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.96 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 78.0.3904.96
engine: Blink
engine_version: ""
device:
type: smartphone
brand: JI
model: G2F
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; JIAYU G3S Build/HM2013023) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome Webview
short_name: CV
version: 30.0.0.0
engine: Blink
engine_version: ""
device:
type: smartphone
brand: JI
model: G3S
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; JY-G4_G5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 YaBrowser/18.11.1.1011.00 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Yandex Browser
short_name: YA
version: 18.11.1.1011.00
engine: Blink
engine_version: ""
device:
type: smartphone
brand: JI
model: G4/G5
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; JY-G4\G5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.92 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 77.0.3865.92
engine: Blink
engine_version: ""
device:
type: smartphone
brand: JI
model: G4/G5
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; HTL22) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.111 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 76.0.3809.111
engine: Blink
engine_version: ""
device:
type: smartphone
brand: HT
model: J One
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; HTL23 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.141 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 35.0.1916.141
engine: Blink
engine_version: ""
device:
type: smartphone
brand: HT
model: J Butterfly
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.1.2; momo mini 3GS Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Safari/537.36
os:
name: Android
short_name: AND
version: 4.1.2
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 42.0.2311.111
engine: Blink
engine_version: ""
device:
type: tablet
brand: PY
model: MOMO Mini 3GS
os_family: Android
browser_family: Chrome
24 changes: 19 additions & 5 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ SFR:

# HTC
HTC:
regex: 'HTC|Sprint (?:APA|ATP)|ADR(?!910L)[a-z0-9]+|NexusHD2|Amaze[ _]4G[);/ ]|(Desire|Sensation|Evo ?3D|IncredibleS|Wildfire|Butterfly)[ _]?([^;/)]+)(?: Build|\))|(Amaze[ _]4G|One ?[XELSV\+]+)[);/ ]|SPV E6[05]0|(One M8|X525a|PG86100|PC36100|XV6975|PJ83100|2PYB2|2PZC5|0PJA10|0PJA2|HTV33|0PM92|0PCV1|601HT|0PAJ5)[);/ ]'
regex: 'HTC|Sprint (?:APA|ATP)|ADR(?!910L)[a-z0-9]+|NexusHD2|Amaze[ _]4G[);/ ]|(Desire|Sensation|Evo ?3D|IncredibleS|Wildfire|Butterfly)[ _]?([^;/)]+)(?: Build|\))|(Amaze[ _]4G|One ?[XELSV\+]+)[);/ ]|SPV E6[05]0|(One M8|X525a|PG86100|PC36100|XV6975|PJ83100|2PYB2|2PZC5|0PJA10|0PJA2|HTV33|0PM92|0PCV1|601HT|0PAJ5|HTL2[23])[);/ ]'
device: 'smartphone'
models:
# explicit smartphone models
Expand All @@ -82,6 +82,10 @@ HTC:
model: 'One'
- regex: 'PJ83100[);/ ]'
model: 'One X'
- regex: 'HTL22[);/ ]'
model: 'J One'
- regex: 'HTL23[);/ ]'
model: 'J Butterfly'
- regex: '(?:0PJA2|0PJA10)[);/ ]'
model: 'One M9'
- regex: 'X525a'
Expand Down Expand Up @@ -4771,11 +4775,13 @@ Evolveo:

# Explay
Explay:
regex: 'Explay|ActiveD[ _]|Atlant |Informer[ _][0-9]+|CinemaTV 3G|Surfer[ _][0-9\.]|sQuad[ _][0-9\.]|Onliner[1-3]|RioPlay|Leader|Infinityll'
regex: 'Explay|ActiveD[ _]|Atlant |Informer[ _][0-9]+|CinemaTV 3G|Surfer[ _][0-9\.]|sQuad[ _][0-9\.]|Onliner[1-3]|RioPlay|Leader|Infinityll|Imperium[78]'
device: 'tablet'
models:
- regex: 'ActiveD[ _]7.4[ _]3G'
model: 'ActiveD 7.4 3G'
- regex: 'Imperium([78])[;/) ]'
model: 'Imperium $1 3G'
- regex: 'ActiveD[ _]8.2[ _]3G'
model: 'ActiveD 8.2 3G'
- regex: 'CinemaTV[ _]3G'
Expand Down Expand Up @@ -6779,9 +6785,15 @@ JAY-Tech:

# Jiayu
Jiayu:
regex: '(JY-[a-z0-9]+)[);/ ]'
regex: '(?:JIAYU|JY-G4[\\_]G5|(?:JY-[a-z0-9]+))[);/ ]'
device: 'smartphone'
model: '$1'
models:
- regex: '(?:JIAYU G4_G5|JY-G4[\\_]G5)[);/ ]'
model: 'G4/G5'
- regex: 'JIAYU (G4[S]?|S2|G2F|G3S)[);/ ]'
model: '$1'
- regex: '(JY-[a-z0-9]+)[);/ ]'
model: '$1'

# Jolla
Jolla:
Expand Down Expand Up @@ -11472,11 +11484,13 @@ Pantech:

# Ployer
Ployer:
regex: 'MOMO([0-9]|miniS)'
regex: 'MOMO([0-9]|[ ]?mini[ ]?(?:S|3GS)?)'
device: 'tablet'
models:
- regex: 'MOMOminiS'
model: 'MOMO mini S'
- regex: 'momo mini 3GS'
model: 'MOMO Mini 3GS'
- regex: 'MOMO([0-9][^);/]*) Build'
model: 'MOMO $1'
- regex: 'MOMO([0-9][^);/]*)[);/]'
Expand Down

0 comments on commit a461afc

Please sign in to comment.