Skip to content

Commit

Permalink
feat(device) detect brand Hisense model: HAT4KDTV
Browse files Browse the repository at this point in the history
feat(device) detect brand Philips models: QM161E, QM163E, QM164E
feat(device) detect brand Sugar models: Y7 Max, Y12, Y8 Max

issue matomo-org#6355
  • Loading branch information
sanchezzzhak committed Aug 22, 2020
1 parent 0fed319 commit 743880f
Show file tree
Hide file tree
Showing 2 changed files with 222 additions and 7 deletions.
200 changes: 200 additions & 0 deletions Tests/fixtures/smartphone-16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5359,3 +5359,203 @@
model: T9702
os_family: Android
browser_family: Opera
-
user_agent: Mozilla/5.0 (Linux; Android 4.1.2; CINK PEAX 2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.99 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.1.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 71.0.3578.99
engine: Blink
engine_version: ""
device:
type: smartphone
brand: WI
model: Cink Peax 2
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.1.2; DNS S4502) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.1.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 71.0.3578.98
engine: Blink
engine_version: ""
device:
type: smartphone
brand: DN
model: S4502
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.1.2; DNS_S4003) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.1.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 70.0.3538.80
engine: Blink
engine_version: ""
device:
type: smartphone
brand: DN
model: S4003
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 8.0; QM161E Build/OPR5.170623.014) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36 OPR/32.0.2128.0 OMI/4.8.0.142.Racer2.47
os:
name: Android
short_name: AND
version: "8.0"
platform: ""
client:
type: browser
name: Opera Devices
short_name: OH
version: 4.8.0.142
engine: Blink
engine_version: ""
device:
type: tv
brand: PH
model: QM161E
os_family: Android
browser_family: Opera
-
user_agent: Mozilla/5.0 (Linux; Android 8.0; QM163E Build/OPR5.170623.014) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36 OPR/32.0.2128.0 OMI/4.8.0.142.Racer2.51
os:
name: Android
short_name: AND
version: "8.0"
platform: ""
client:
type: browser
name: Opera Devices
short_name: OH
version: 4.8.0.142
engine: Blink
engine_version: ""
device:
type: tv
brand: PH
model: QM163E
os_family: Android
browser_family: Opera
-
user_agent: Mozilla/5.0 (Linux; Android 7.1.2; QM164E Build/NZH54D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36 OPR/32.0.2128.0 OMI/4.8.0.142.Racer.70
os:
name: Android
short_name: AND
version: 7.1.2
platform: ""
client:
type: browser
name: Opera Devices
short_name: OH
version: 4.8.0.142
engine: Blink
engine_version: ""
device:
type: tv
brand: PH
model: QM164E
os_family: Android
browser_family: Opera
-
user_agent: Mozilla/5.0 (Linux; Android 8.0.0; HAT4KDTV Build/OTT1.180130.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36 OPR/46.0.2207.0 OMI/4.13.2.294.Martell-5.19 Model/Hisense-MT5660
os:
name: Android
short_name: AND
version: 8.0.0
platform: ""
client:
type: browser
name: Opera Devices
short_name: OH
version: 4.13.2.294
engine: Blink
engine_version: ""
device:
type: tv
brand: HI
model: HAT4KDTV
os_family: Android
browser_family: Opera
-
user_agent: Mozilla/5.0 (Linux; Android 6.0; SUGAR Y7 MAX Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "6.0"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 69.0.3497.100
engine: Blink
engine_version: ""
device:
type: smartphone
brand: 9S
model: Y7 Max
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; U; Android 7.1.2; en-US; SUGAR Y12 Build/N2G47H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.9.5.1146 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 7.1.2
platform: ""
client:
type: browser
name: UC Browser
short_name: UC
version: 12.9.5.1146
engine: WebKit
engine_version: "537.36"
device:
type: smartphone
brand: 9S
model: Y12
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 7.1.2; SUGAR Y8 MAX) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.64 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 7.1.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 70.0.3538.64
engine: Blink
engine_version: ""
device:
type: smartphone
brand: 9S
model: Y8 Max
os_family: Android
browser_family: Chrome
29 changes: 22 additions & 7 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3978,10 +3978,10 @@ Doro:

# DNS
DNS:
regex: '(?:DNS|AirTab)[ _\-]([^;/]+)Build|(?:S4505M|SD01M)[);/ ]'
regex: '(?:DNS|AirTab)[ _\-]([^;/)]+)(?: Build|\))|(?:S4505M|SD01M)[);/ ]'
device: 'smartphone'
models:
- regex: '(S4505M|SD01M)[);/ ]'
- regex: '(?:DNS[_ ])?(S4505M|SD01M|S4502|S4003|S4003)[);/ ]'
model: '$1'
- regex: 'AirTab[ _\-]([^;/]+)Build'
model: 'AirTab $1'
Expand Down Expand Up @@ -5370,7 +5370,7 @@ Hasee:

# Hisense
Hisense:
regex: '(?:HS-)?Hisense ([^;/]+) Build|Hisense [^);/]+|HS-(?:G|U|EG?|I|L|T|X)[0-9]+[a-z0-9\-]*|E270BSA|HITV300C|M470BS[AE]|E2281|EG680|I46D1G|HLTE([237]00T|200M|21[237]T|22[13]E|310M|510T)'
regex: '(?:HS-)?Hisense ([^;/]+) Build|Hisense [^);/]+|HS-(?:G|U|EG?|I|L|T|X)[0-9]+[a-z0-9\-]*|E270BSA|HITV300C|M470BS[AE]|E2281|EG680|I46D1G|HAT4KDTV|HLTE([237]00T|200M|21[237]T|22[13]E|310M|510T)'
device: 'smartphone'
models:
# explicit tablet models
Expand Down Expand Up @@ -5409,6 +5409,11 @@ Hisense:
model: 'E9'
- regex: '(HS-(?:G|U|EG?|I|L|T|X)[0-9]+[a-z0-9\-]*)'
model: '$1'

- regex: '(HAT4KDTV)[);/ ]'
device: 'tv'
model: '$1'

- regex: '(?:HS-)?Hisense ([^;/]+) Build'
model: '$1'
- regex: 'Hisense ([^);/]+)'
Expand Down Expand Up @@ -9936,7 +9941,7 @@ Pentagram:

# philips
Philips:
regex: 'Philips|AND1E[);/ ]|NETTV/|PI3210G|TLE(821L|722G)|TPM1[79]1E|70PUH6774_96'
regex: 'Philips|AND1E[);/ ]|NETTV/|PI3210G|TLE(821L|722G)|TPM1[79]1E|70PUH6774_96|QM16[134]E'
device: 'smartphone'
models:
- regex: 'AND1E(?: TV)?[);/ ]'
Expand All @@ -9948,6 +9953,9 @@ Philips:
- regex: '(TPM1[79]1E)' # Smart Tv 2018/2019
model: '$1'
device: 'tv'
- regex: '(QM16[134]E)'
model: '$1'
device: 'tv'
- regex: '(70PUH6774)_96'
model: '$1/96 4K UHD'
device: 'tv'
Expand Down Expand Up @@ -13099,9 +13107,11 @@ Wexler:

# Wiko
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|P200)|WC300|W-(V720|V800|P[36]11|K420|K510)-(TVM|EEA|SUN|OPE)|WIM Lite|W-K360-TV|W-U300|U307AS'
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|P200)|WC300|W-(V720|V800|P[36]11|K420|K510)-(TVM|EEA|SUN|OPE)|WIM Lite|W-K360-TV|W-U300|U307AS|CINK PEAX 2'
device: 'smartphone'
models:
- regex: '(?:WIKO-)?Cink Peax 2'
model: 'Cink Peax 2'
- regex: '(?:Wiko-)?Cink([^/;]*) Build'
model: 'Cink$1'
- regex: '(?:WIKO-)?CINK_([a-z0-9_]+)'
Expand Down Expand Up @@ -15484,9 +15494,14 @@ Kuliao:

# Sugar
Sugar:
regex: 'SUGAR (C[12]1|[YF]11|[YFS]9|C6|Y7|Y15)[);/ ]'
regex: 'SUGAR (?:C[12]1|[YF]11|[YFS]9|C6|Y7|Y8|Y1[25])[);/ ]'
device: 'smartphone'
model: '$1'
models:
- regex: 'SUGAR Y([78]) MAX[);/ ]'
model: 'Y$1 Max'
- regex: 'SUGAR (C[12]1|[YF]11|[YFS]9|C6|Y7|Y1[25])[);/ ]'
model: '$1'


# Xshitou
Xshitou:
Expand Down

0 comments on commit 743880f

Please sign in to comment.