From 49a636d684896850406400570a6724523cfa2eba Mon Sep 17 00:00:00 2001 From: sanchezzzhak Date: Tue, 14 Feb 2023 13:02:06 +0300 Subject: [PATCH] feat(device) detect new brand PC Smart: QuickTab Plus feat(device) detect brand NASCO: Snap Pro ref #7139 --- Parser/Device/AbstractDeviceParser.php | 1 + Tests/fixtures/smartphone-34.yml | 18 ++++++++++++++++++ Tests/fixtures/tablet-9.yml | 18 ++++++++++++++++++ regexes/device/mobiles.yml | 10 +++++++++- 4 files changed, 46 insertions(+), 1 deletion(-) diff --git a/Parser/Device/AbstractDeviceParser.php b/Parser/Device/AbstractDeviceParser.php index ea56df0a39..51e8debae2 100644 --- a/Parser/Device/AbstractDeviceParser.php +++ b/Parser/Device/AbstractDeviceParser.php @@ -1087,6 +1087,7 @@ abstract class AbstractDeviceParser extends AbstractParser 'PAR' => 'Partner Mobile', 'PAP' => 'PAPYRE', 'PB' => 'PCBOX', + 'PCS' => 'PC Smart', 'PC' => 'PCD', 'PD' => 'PCD Argentina', 'PE' => 'PEAQ', diff --git a/Tests/fixtures/smartphone-34.yml b/Tests/fixtures/smartphone-34.yml index 5766713c12..70878c6d6b 100644 --- a/Tests/fixtures/smartphone-34.yml +++ b/Tests/fixtures/smartphone-34.yml @@ -7511,3 +7511,21 @@ model: M2s os_family: Android browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 7.0; SNAP_PRO) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Mobile Safari/537.36 + os: + name: Android + version: "7.0" + platform: "" + client: + type: browser + name: Chrome Mobile + version: 76.0.3809.132 + engine: Blink + engine_version: 76.0.3809.132 + device: + type: tablet + brand: NASCO + model: Snap Pro + os_family: Android + browser_family: Chrome diff --git a/Tests/fixtures/tablet-9.yml b/Tests/fixtures/tablet-9.yml index 608145d930..771ceed6b3 100644 --- a/Tests/fixtures/tablet-9.yml +++ b/Tests/fixtures/tablet-9.yml @@ -3237,3 +3237,21 @@ model: RubensTab T11 os_family: Android browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 9; QUICKTAB PLUS) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.119 Mobile Safari/537.36 + os: + name: Android + version: "9" + platform: "" + client: + type: browser + name: Chrome Mobile + version: 80.0.3987.119 + engine: Blink + engine_version: 80.0.3987.119 + device: + type: smartphone + brand: PC Smart + model: QuickTab Plus + os_family: Android + browser_family: Chrome diff --git a/regexes/device/mobiles.yml b/regexes/device/mobiles.yml index fca4515a00..dc62d227d6 100644 --- a/regexes/device/mobiles.yml +++ b/regexes/device/mobiles.yml @@ -34266,11 +34266,13 @@ NINETEC: # NASCO NASCO: - regex: 'NASCO (?:TANGO 7)(?:[);/ ]|$)' + regex: '(?:NASCO (?:TANGO 7)|SNAP_PRO)(?:[);/ ]|$)' device: 'tablet' models: - regex: 'TANGO 7' model: 'Tango 7' + - regex: 'SNAP_PRO' + model: 'Snap Pro' # Elecson Elecson: @@ -35003,6 +35005,12 @@ MIWANG: device: 'smartphone' model: '$1' +# PC Smart +PC Smart: + regex: 'QUICKTAB PLUS' + device: 'smartphone' + model: 'QuickTab Plus' + # Devices with undectable brand, but detectable model Unknown: regex: 'Plasma Mobile|WebTV/(\d+\.\d+)|TV Bro|(?:M10 Ultra|FO-R15|TVBOX|Smart[ _]?TV|SmartATV|M8S\+ 4K|PCBox|rk(?:3128|322x|3368)(?:[_-]box)?|H10 PLAY|Smart AIO TV|TVBOX_L|L-BOX|TVBOX-5G|mips.+(?:Opera TV|wireless|wired)|smartbox|TV BOX|I12Pro Max|(?:audi_)?ks1280x480|AT&T TV|RealtekATV|AOSP on r33a0|hx322x_box)(?:[);/ ]|$)'