Skip to content

Commit

Permalink
Improves detection for Lectrus, Maxcom and Sunmax devices (#7906)
Browse files Browse the repository at this point in the history
* Improves detection for Sunmax devices
* Improves detection for Maxcom devices
* Improves detection for Lectrus devices
* Fix engine version
  • Loading branch information
liviuconcioiu authored Nov 7, 2024
1 parent fb97daa commit 3f25089
Show file tree
Hide file tree
Showing 3 changed files with 222 additions and 5 deletions.
175 changes: 175 additions & 0 deletions Tests/fixtures/clienthints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3684,3 +3684,178 @@
model: Galaxy A13
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36
headers:
Sec-CH-UA: '"Not_A Brand";v="8.0.0.0", "Chromium";v="120.0.6099.210", "Google Chrome";v="120.0.6099.210"'
Sec-CH-UA-Platform: "Android"
Sec-CH-UA-Mobile: "?1"
Sec-CH-UA-Full-Version: "120.0.6099.210"
Sec-CH-UA-Platform-Version: "11.0.0"
Sec-CH-UA-Model: "Model S 4G"
os:
name: Android
version: 11.0.0
platform: ""
client:
type: browser
name: Chrome Mobile
version: 120.0.6099.210
engine: Blink
engine_version: 120.0.6099.210
device:
type: smartphone
brand: Sunmax
model: Model S 4G
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36
headers:
Sec-CH-UA: '"Chromium";v="124.0.6367.113", "Google Chrome";v="124.0.6367.113", "Not-A.Brand";v="99.0.0.0"'
Sec-CH-UA-Platform: "Android"
Sec-CH-UA-Mobile: "?1"
Sec-CH-UA-Full-Version: "124.0.6367.113"
Sec-CH-UA-Platform-Version: "11.0.0"
Sec-CH-UA-Model: "Model S"
os:
name: Android
version: 11.0.0
platform: ""
client:
type: browser
name: Chrome Mobile
version: 124.0.6367.113
engine: Blink
engine_version: 124.0.6367.113
device:
type: smartphone
brand: Sunmax
model: Model S
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; Model D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36
headers:
Sec-CH-UA: '" Not A;Brand";v="99.0.0.0", "Chromium";v="102.0.5005.125", "Google Chrome";v="102.0.5005.125"'
Sec-CH-UA-Platform: "Android"
Sec-CH-UA-Mobile: "?1"
Sec-CH-UA-Full-Version: "102.0.5005.125"
Sec-CH-UA-Platform-Version: "12.0.0"
Sec-CH-UA-Model: "Model D"
os:
name: Android
version: 12.0.0
platform: ""
client:
type: browser
name: Chrome Mobile
version: 102.0.5005.125
engine: Blink
engine_version: 102.0.5005.125
device:
type: smartphone
brand: Sunmax
model: Model D
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Model A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Mobile Safari/537.36
headers:
Sec-CH-UA: '"Chromium";v="104.0.5112.69", " Not A;Brand";v="99.0.0.0", "Google Chrome";v="104.0.5112.69"'
Sec-CH-UA-Platform: "Android"
Sec-CH-UA-Mobile: "?1"
Sec-CH-UA-Full-Version: "104.0.5112.69"
Sec-CH-UA-Platform-Version: "8.1.0"
Sec-CH-UA-Model: "Model A"
os:
name: Android
version: 8.1.0
platform: ""
client:
type: browser
name: Chrome Mobile
version: 104.0.5112.69
engine: Blink
engine_version: 104.0.5112.69
device:
type: smartphone
brand: Sunmax
model: Model A
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11; Model 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 Mobile Safari/537.36
headers:
Sec-CH-UA: '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"'
Sec-CH-UA-Platform: "Android"
Sec-CH-UA-Mobile: "?1"
Sec-CH-UA-Full-Version: "94.0.4606.85"
Sec-CH-UA-Platform-Version: "11.0.0"
Sec-CH-UA-Model: "Model 6"
os:
name: Android
version: 11.0.0
platform: ""
client:
type: browser
name: Chrome Mobile
version: 94.0.4606.85
engine: Blink
engine_version: 94.0.4606.85
device:
type: smartphone
brand: Sunmax
model: Model 6
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36
headers:
Sec-CH-UA: '"Chromium";v="124.0.6367.82", "Google Chrome";v="124.0.6367.82", "Not-A.Brand";v="99.0.0.0"'
Sec-CH-UA-Platform: "Android"
Sec-CH-UA-Mobile: "?1"
Sec-CH-UA-Full-Version: "124.0.6367.82"
Sec-CH-UA-Platform-Version: "11.0.0"
Sec-CH-UA-Model: "Model_6_pro_4G"
os:
name: Android
version: 11.0.0
platform: ""
client:
type: browser
name: Chrome Mobile
version: 124.0.6367.82
engine: Blink
engine_version: 124.0.6367.82
device:
type: smartphone
brand: Sunmax
model: Model 6 Pro 4G
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Mobile Safari/537.36
headers:
Sec-CH-UA: '"Chromium";v="122.0.6261.90", "Not(A:Brand";v="24.0.0.0", "Google Chrome";v="122.0.6261.90"'
Sec-CH-UA-Platform: "Android"
Sec-CH-UA-Mobile: "?1"
Sec-CH-UA-Full-Version: "122.0.6261.90"
Sec-CH-UA-Platform-Version: "9.0.0"
Sec-CH-UA-Model: "LECT-TAB1011H"
os:
name: Android
version: 9.0.0
platform: ""
client:
type: browser
name: Chrome Mobile
version: 122.0.6261.90
engine: Blink
engine_version: 122.0.6261.90
device:
type: tablet
brand: Lectrus
model: LECT-TAB1011H
os_family: Android
browser_family: Chrome
36 changes: 36 additions & 0 deletions Tests/fixtures/smartphone-18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3669,3 +3669,39 @@
model: SS5424G
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 8.1.0; MS571) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Mobile Safari/537.36
os:
name: Android
version: 8.1.0
platform: ""
client:
type: browser
name: Chrome Mobile
version: 103.0.0.0
engine: Blink
engine_version: 103.0.0.0
device:
type: smartphone
brand: Maxcom
model: MS571
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 9; MS572) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36
os:
name: Android
version: "9"
platform: ""
client:
type: browser
name: Chrome Mobile
version: 108.0.0.0
engine: Blink
engine_version: 108.0.0.0
device:
type: smartphone
brand: Maxcom
model: MS572
os_family: Android
browser_family: Chrome
16 changes: 11 additions & 5 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31914,14 +31914,14 @@ Ruggex:

# Maxcom (maxcom.pl)
Maxcom:
regex: '(?:MS(?:45[036]|505|507_STRONG|514|651)|MS457(?:PLUS)?|RS-401|Neva Rise S1)(?:[);/ ]|$)'
regex: '(?:MS(?:45[036]|505|507_STRONG|514|57[12]|651)|MS457(?:PLUS)?|RS-401|Neva Rise S1)(?:[);/ ]|$)'
device: 'smartphone'
models:
- regex: '(MS457)PLUS(?:[);/ ]|$)'
model: '$1 Plus'
- regex: '(MS507)_STRONG(?:[);/ ]|$)'
model: '$1 Strong'
- regex: 'MS(45[0367]|505|514|651)(?:[);/ ]|$)'
- regex: 'MS(45[0367]|505|514|57[12]|651)(?:[);/ ]|$)'
model: 'MS$1'
- regex: 'RS-401(?:[);/ ]|$)'
model: 'RS-401'
Expand Down Expand Up @@ -40437,9 +40437,15 @@ Khadas:

# Sunmax or sunmax mobile (sunmaxmobile.com)
Sunmax:
regex: '(Model Y)(?:[);/ ]|$)'
regex: 'Model[ _][6ADSY](?:[ _]pro)?(?:[ _]4G)?(?:[);/ ]|$)'
device: 'smartphone'
model: '$1'
models:
- regex: 'Model_6_pro_4G'
model: 'Model 6 Pro 4G'
- regex: '(Model S 4G)'
model: '$1'
- regex: '(Model [6ADSY])'
model: '$1'

# Kapsys (kapsys.com)
Kapsys:
Expand Down Expand Up @@ -40858,7 +40864,7 @@ BluSlate:

# Lectrus
Lectrus:
regex: 'LECT-TAB(1011|0711)(?:[);/ ]|$)'
regex: 'LECT-TAB(1011H?|0711)(?:[);/ ]|$)'
device: 'tablet'
model: 'LECT-TAB$1'

Expand Down

0 comments on commit 3f25089

Please sign in to comment.