Skip to content

Commit

Permalink
feat(device) detect new brand EXO model: Wave i101G
Browse files Browse the repository at this point in the history
feat(device) detect brand Mystery model: MID-823G
feat(device) detect brand Wiko model: View 2 Pro (W_C860)
feat(device) detect brand Evolveo model: StrongPhone Q7 LTE
feat(device) detect brand Ergo model: Tab B700
feat(device) detect brand Sencor model: Element 10.1" Q001
feat(device) detect brand Easypix model: EasyPad T7C
feat(device) detect brand BenQ model: F52

issue matomo-org#6355
  • Loading branch information
sanchezzzhak committed Nov 25, 2020
1 parent 6316541 commit 0edac33
Show file tree
Hide file tree
Showing 3 changed files with 174 additions and 11 deletions.
1 change: 1 addition & 0 deletions Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'EV' => 'Evertek',
'E3' => 'Evolio',
'EO' => 'Evolveo',
'EH' => 'EXO',
'EX' => 'Explay',
'E0' => 'EvroMedia',
'E5' => 'Extrem',
Expand Down
145 changes: 145 additions & 0 deletions Tests/fixtures/smartphone-18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6873,3 +6873,148 @@
model: 1T
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 8.0.0; W_C860) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36
os:
name: Android
version: 8.0.0
platform: ""
client:
type: browser
name: Chrome Mobile
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: smartphone
brand: Wiko
model: View 2 Pro
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 8.0.0; Wave_i101G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36
os:
name: Android
version: 8.0.0
platform: ""
client:
type: browser
name: Chrome
version: 80.0.3987.87
engine: Blink
engine_version: ""
device:
type: tablet
brand: EXO
model: Wave i101G
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.1.2; en-US; MID-823G Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/40.0.2214.89 UCBrowser/11.5.0.1015 Mobile Safari/537.36
os:
name: Android
version: 4.1.2
platform: ""
client:
type: browser
name: UC Browser
version: 11.5.0.1015
engine: WebKit
engine_version: "537.36"
device:
type: tablet
brand: Mystery
model: MID-823G
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 5.1.1; EVOLVEO_StrongPhone_Q7_LTE) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.90 Mobile Safari/537.36
os:
name: Android
version: 5.1.1
platform: ""
client:
type: browser
name: Chrome Mobile
version: 78.0.3904.90
engine: Blink
engine_version: ""
device:
type: smartphone
brand: Evolveo
model: StrongPhone Q7 LTE
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1.1; ERGO B700 5.1 V1.0 20170427) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.62 Safari/537.36
os:
name: Android
version: 5.1.1
platform: ""
client:
type: browser
name: Chrome
version: 78.0.3904.62
engine: Blink
engine_version: ""
device:
type: tablet
brand: Ergo
model: Tab B700
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1.1; Element 10.1 Q001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
os:
name: Android
version: 5.1.1
platform: ""
client:
type: browser
name: Chrome
version: 78.0.3904.108
engine: Blink
engine_version: ""
device:
type: tablet
brand: Sencor
model: Element 10.1" Q001
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1.1; EASYPAD T7C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36 OPR/54.3.2672.50220
os:
name: Android
version: 5.1.1
platform: ""
client:
type: browser
name: Opera
version: 54.3.2672.50220
engine: Blink
engine_version: ""
device:
type: tablet
brand: Easypix
model: EasyPad T7C
os_family: Android
browser_family: Opera
-
user_agent: Mozilla/5.0 (Linux; Android 5.1.1; F52_09) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36
os:
name: Android
version: 5.1.1
platform: ""
client:
type: browser
name: Chrome Mobile
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: smartphone
brand: BenQ
model: F52
os_family: Android
browser_family: Chrome

39 changes: 28 additions & 11 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2782,9 +2782,13 @@ BenQ-Siemens:

# BenQ
BenQ:
regex: 'BENQ(?:[ \-])?([a-z0-9]+)'
regex: 'BENQ(?:[ \-])?([a-z0-9]+)|F52_09(?:[);/ ]|$)'
device: 'feature phone'
model: '$1'
models:
- regex: 'F52_09(?:[);/ ]|$)'
model: 'F52'
- regex: 'BENQ(?:[ \-])?([a-z0-9]+)'
model: '$1'

# Blaupunkt
Blaupunkt:
Expand Down Expand Up @@ -4289,8 +4293,8 @@ Easypix:
models:
- regex: '(EasyPhone[^/;]+) Build'
model: '$1'
- regex: '(EasyPad[^/;]+) Build'
model: '$1'
- regex: 'EasyPad ([^/;)]+)(?: Build|[;)])'
model: 'EasyPad $1'
device: 'tablet'

# Ebest
Expand Down Expand Up @@ -5002,6 +5006,9 @@ Ergo:
- regex: 'ERGO[_ ]Tab[ _]Hero[ _]II'
model: 'Tab Hero II'
device: 'tablet'
- regex: 'ERGO[_ ](B700)'
model: 'Tab $1'
device: 'tablet'

- regex: 'ERGO SmartBox SX'
model: 'SmartBox SX'
Expand Down Expand Up @@ -5097,8 +5104,8 @@ Evolveo:
model: 'Smart TV $1'
- regex: 'EVOLVEO StrongPhone G([248])'
model: 'StrongPhone G$1'
- regex: 'EVOLVEO StrongPhone Q(6)'
model: 'StrongPhone Q$1'
- regex: 'EVOLVEO[ _]StrongPhone[ _]Q([67])(_LTE)?'
model: 'StrongPhone Q$1$2'
- regex: 'EVOLVEO[ _]([^;/]*) Build'
model: '$1'

Expand Down Expand Up @@ -12268,10 +12275,12 @@ Selfix:

# Sencor
Sencor:
regex: 'Sencor|ELEMENT[ _]?(?:7|8|9\.7|10[ _]1)(?:[ _]?V[23])?(?:[);/ ]|$)|ELEMENT[ _]?(?:P[0-9]+)(?:[);/ ]|$)'
regex: 'Sencor|ELEMENT[ _]?(?:7|8|9\.7|10[ _]1)(?:[ _]?V[23])?(?:[);/ ]|$)|ELEMENT[ _]?(?:P[0-9]+|10.1 Q001)(?:[);/ ]|$)'
device: 'tablet'
models:
# explicit tablet models
- regex: '(?:SENCOR[ _])?Element (10\.1) (Q001)'
model: 'Element $1" $2'
- regex: '(?:SENCOR[ _])?ELEMENT[ _]?7[ _]?V3'
model: 'Element 7 V3'
- regex: '(?:SENCOR[ _])?ELEMENT[ _]?7[ _]?V2[ _]BASIC'
Expand Down Expand Up @@ -14332,7 +14341,7 @@ Wexler:

# Wiko (wikomobile.com)
Wiko:
regex: '(?:WIKO[_ -])|(?:WIKO-)?CINK_[a-z0-9_]+|(?:WIKO-)?HIGHWAY_[a-z0-9_]+|(?:WIKO-)?(?:Cink([^/;]*)|Highway([^/;]*)|Iggy|Stairway|Rainbow ?(Jam|Lite|Up)?|Darkside|Darkmoon|Darkfull|Darknight|Freddy|FEVER|Jerry[2]?|Sublim|Ozzy|JIMMY|Barry|Birdy|Bloom|Getaway|Goa(?!nna)|Kite|Robby|Lenny[2-9]?|Slide|Sunset[2-9]?|Sunny[2-9]?|Tommy[2-9]?|PULP(?: Fab)?|Wax|HARRY|Ridge(?: Fab)?|U FEEL(?: Prime| Lite)?|U PULSE(?: LITE)?|View2 Go|View XL|View Prime)(?: Plus)?(?: 4G)?(?: Build|$)?|W_(?:C800|K[346]00|P130|P200|C200SN)|WC300|W-(?:V7[23]0|V8[30]0|P[36]11|K420|K510|K130)-(?:TMV|TVM|EEA|SUN|OPE)|WIM Lite|W-K360-TV|W-V600|W-K200|W-U300|U307AS|CINK PEAX 2|HIGHWAY PURE'
regex: '(?:WIKO[_ -])|(?:WIKO-)?CINK_[a-z0-9_]+|(?:WIKO-)?HIGHWAY_[a-z0-9_]+|(?:WIKO-)?(?:Cink([^/;]*)|Highway([^/;]*)|Iggy|Stairway|Rainbow ?(Jam|Lite|Up)?|Darkside|Darkmoon|Darkfull|Darknight|Freddy|FEVER|Jerry[2]?|Sublim|Ozzy|JIMMY|Barry|Birdy|Bloom|Getaway|Goa(?!nna)|Kite|Robby|Lenny[2-9]?|Slide|Sunset[2-9]?|Sunny[2-9]?|Tommy[2-9]?|PULP(?: Fab)?|Wax|HARRY|Ridge(?: Fab)?|U FEEL(?: Prime| Lite)?|U PULSE(?: LITE)?|View2 Go|View XL|View Prime)(?: Plus)?(?: 4G)?(?: Build|$)?|W_(?:C8[06]0|K[346]00|P130|P200|C200SN)|WC300|W-(?:V7[23]0|V8[30]0|P[36]11|K420|K510|K130)-(?:TMV|TVM|EEA|SUN|OPE)|WIM Lite|W-K360-TV|W-V600|W-K200|W-U300|U307AS|CINK PEAX 2|HIGHWAY PURE'
device: 'smartphone'
models:
- regex: '(?:WIKO-)?Cink Peax 2'
Expand Down Expand Up @@ -14479,6 +14488,8 @@ Wiko:
model: 'View Lite'
- regex: 'W_C800'
model: 'View 2'
- regex: 'W_C860'
model: 'View 2 Pro'
- regex: 'W_P200'
model: 'View Max'
- regex: 'W_P130'
Expand Down Expand Up @@ -16522,10 +16533,10 @@ Yota:

# Mystery
Mystery:
regex: '(MYSTERY|MID-(?:123G|72[12]|7[01348]3G|753G|833G))(?:[);/ ]|$)'
regex: '(MYSTERY|MID-(?:123G|72[12]|7[01348]3G|753G|8[23]3G))(?:[);/ ]|$)'
device: 'tablet'
models:
- regex: 'MID-(123G|72[12]|7[01348]3G|753G|833G)(?:[);/ ]|$)'
- regex: 'MID-(123G|72[12]|7[01348]3G|753G|8[23]3G)(?:[);/ ]|$)'
model: 'MID-$1'

# Ritzviva
Expand Down Expand Up @@ -16824,6 +16835,12 @@ ONN:
device: 'tablet'
model: '$1'

# EXO S.A
EXO:
regex: '(Wave_i101G)(?:[);/ ]|$)'
device: 'tablet'
model: '$1'

# Q.Bell
'Q.Bell':
regex: '(QPHONE[_ ](?:10.1|9.1|5.4))(?:[);/ ]|$)'
Expand Down Expand Up @@ -18001,7 +18018,7 @@ eSTAR:
model: '$1 $2 Quad Core 3G'
- regex: 'eSTAR (Zoom Quad|Gemini|GO)'
model: '$1'
- regex: 'eSTAR GRAND HD quad core( [34]G)'
- regex: 'eSTAR GRAND HD quad core( [34]G)?'
model: 'Grand HD Quad Core$1'
- regex: 'eSTAR GRAND'
model: 'Grand'
Expand Down

0 comments on commit 0edac33

Please sign in to comment.