From ca9285c9489cd9014c6a0be4178c3f79f1196dfe Mon Sep 17 00:00:00 2001 From: Tutik Alexsandr Date: Thu, 12 Jan 2023 16:44:44 +0300 Subject: [PATCH] Detect new brands: LPX-G, GIRASOLE, MOVISUN, Sankey, VALTECH, Samtech and Detect devices for existing brands (#7328) feat(device) detect brand Vertex: Luck L 5045 3G feat(device) detect brand Xiaomi: Redmi 9T NFC feat(device) detect brand Eltex: NV-720-WB feat(device) detect new brand LPX-G: Box Max feat(device) detect brand LT Mobile: P10 (C3200) feat(device) detect brand Logicom: M BOT Tab 103, M BOT Tab 10 feat(device) detect brand Thomson: TEO13P, TEO10S feat(device) detect brand Telefunken: TF6, TF501 EC, TF500 feat(device) detect new brand GIRASOLE: TAB5 feat(device) detect new brand MOVISUN: TAB-S1 feat(device) detect new brand Sankey: TAB-7A3G05 feat(device) detect new brand VALTECH: TAB-7Q804VAL feat(device) detect brand Sunstech: TAB1081 feat(device) detect brand Masstel: Tab 8 Plus, Tab 7 Plus, Tab 10 Plus feat(device) detect new brand Samtech: T3G 04 feat(device) detect brand Noblex: T7A6INC feat(device) detect brand Hotwav: Symbol, Symbol Pro feat(device) detect brand CORN: Star7 3G feat(device) detect brand EKO: Star 6.0 G65, Star 5.5 G55, Star 5.0 G50, Star 4.0 G40 --- Parser/Device/AbstractDeviceParser.php | 6 + Tests/fixtures/smartphone-34.yml | 198 ++++++++++++++++++ Tests/fixtures/tablet-2.yml | 4 +- Tests/fixtures/tablet-9.yml | 270 +++++++++++++++++++++++++ Tests/fixtures/tv-2.yml | 54 +++++ regexes/device/mobiles.yml | 99 +++++++-- 6 files changed, 607 insertions(+), 24 deletions(-) diff --git a/Parser/Device/AbstractDeviceParser.php b/Parser/Device/AbstractDeviceParser.php index 1be16b8f5b..10db44de92 100644 --- a/Parser/Device/AbstractDeviceParser.php +++ b/Parser/Device/AbstractDeviceParser.php @@ -551,6 +551,7 @@ abstract class AbstractDeviceParser extends AbstractParser 'GZ' => 'Ginzzu', '1G' => 'Gini', 'GI' => 'Gionee', + 'GIR' => 'GIRASOLE', 'G4' => 'Globex', '38' => 'GLONYX', 'U6' => 'Glofiish', @@ -832,6 +833,7 @@ abstract class AbstractDeviceParser extends AbstractParser 'LH' => 'Logic Instrument', 'LM' => 'Logicom', 'GY' => 'LOKMAT', + 'LPX' => 'LPX-G', '0L' => 'Lumigon', 'LU' => 'Lumus', 'LUM' => 'Lumitel', @@ -922,6 +924,7 @@ abstract class AbstractDeviceParser extends AbstractParser 'MR' => 'Motorola', 'MV' => 'Movic', 'MOV' => 'Movitel', + 'MO1' => 'MOVISUN', 'MOS' => 'Mosimosi', 'MOX' => 'Moxee', 'MM' => 'Mpman', @@ -1203,9 +1206,11 @@ abstract class AbstractDeviceParser extends AbstractParser 'SG' => 'Sagem', '4L' => 'Salora', 'SA' => 'Samsung', + 'SAT' => 'Samtech', 'SNA' => 'SNAMI', 'S0' => 'Sanei', '12' => 'Sansui', + 'SAK' => 'Sankey', 'SQ' => 'Santin', 'SY' => 'Sanyo', 'S9' => 'Savio', @@ -1450,6 +1455,7 @@ abstract class AbstractDeviceParser extends AbstractParser 'VP' => 'Vargo', 'VC' => 'Vankyo', 'VAL' => 'VALEM', + 'VAT' => 'VALTECH', 'VB' => 'VC', 'VN' => 'Venso', 'VEN' => 'Venstar', diff --git a/Tests/fixtures/smartphone-34.yml b/Tests/fixtures/smartphone-34.yml index 14fe1f352e..c88bed5cd1 100644 --- a/Tests/fixtures/smartphone-34.yml +++ b/Tests/fixtures/smartphone-34.yml @@ -3537,3 +3537,201 @@ model: Hexin H3 os_family: Android browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Vertex_Luck_L_5045_3G Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/108.0.5359.79 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Webview + version: 108.0.5359.79 + engine: Blink + engine_version: 108.0.5359.79 + device: + type: smartphone + brand: Vertex + model: Luck L 5045 3G + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 11; Redmi 9T NFC_SN) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36 + os: + name: Android + version: "11" + platform: "" + client: + type: browser + name: Chrome Mobile + version: 108.0.0.0 + engine: Blink + engine_version: 108.0.0.0 + device: + type: smartphone + brand: Xiaomi + model: Redmi 9T NFC + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 7.1.2; LT C3200) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.101 Mobile Safari/537.36 + os: + name: Android + version: 7.1.2 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 85.0.4183.101 + engine: Blink + engine_version: 85.0.4183.101 + device: + type: smartphone + brand: LT Mobile + model: P10 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; TF6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.101 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 85.0.4183.101 + engine: Blink + engine_version: 85.0.4183.101 + device: + type: smartphone + brand: Telefunken + model: TF6 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Symbol) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 87.0.4280.101 + engine: Blink + engine_version: 87.0.4280.101 + device: + type: smartphone + brand: Hotwav + model: Symbol + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Symbol Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.81 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 85.0.4183.81 + engine: Blink + engine_version: 85.0.4183.81 + device: + type: smartphone + brand: Hotwav + model: Symbol Pro + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Star7 3G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.96 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 81.0.4044.96 + engine: Blink + engine_version: 81.0.4044.96 + device: + type: smartphone + brand: CORN + model: Star7 3G + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Star 6.0 G65) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 83.0.4103.106 + engine: Blink + engine_version: 83.0.4103.106 + device: + type: smartphone + brand: EKO + model: Star 6.0 G65 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Star 5.5 G55) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.96 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 83.0.4103.96 + engine: Blink + engine_version: 83.0.4103.96 + device: + type: smartphone + brand: EKO + model: Star 5.5 G55 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Star 5.0 G50) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.99 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 80.0.3987.99 + engine: Blink + engine_version: 80.0.3987.99 + device: + type: smartphone + brand: EKO + model: Star 5.0 G50 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Star 4.0 G40) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 79.0.3945.93 + engine: Blink + engine_version: 79.0.3945.93 + device: + type: smartphone + brand: EKO + model: Star 4.0 G40 + os_family: Android + browser_family: Chrome diff --git a/Tests/fixtures/tablet-2.yml b/Tests/fixtures/tablet-2.yml index 30d598b8c0..3d8b217d71 100644 --- a/Tests/fixtures/tablet-2.yml +++ b/Tests/fixtures/tablet-2.yml @@ -8735,7 +8735,7 @@ device: type: tablet brand: Logicom - model: M BOT tab 1150 + model: M BOT Tab 1150 os_family: Android browser_family: Chrome - @@ -8753,7 +8753,7 @@ device: type: tablet brand: Logicom - model: M BOT tab 71 + model: M BOT Tab 71 os_family: Android browser_family: Chrome - diff --git a/Tests/fixtures/tablet-9.yml b/Tests/fixtures/tablet-9.yml index 90ea27e9fc..7d146a8595 100644 --- a/Tests/fixtures/tablet-9.yml +++ b/Tests/fixtures/tablet-9.yml @@ -1433,3 +1433,273 @@ model: G101-OG os_family: Android browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 7.1.2; M bot Tab 103) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36 + os: + name: Android + version: 7.1.2 + platform: "" + client: + type: browser + name: Chrome + version: 83.0.4103.106 + engine: Blink + engine_version: 83.0.4103.106 + device: + type: tablet + brand: Logicom + model: M BOT Tab 103 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 7.1.2; M bot tab 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36 + os: + name: Android + version: 7.1.2 + platform: "" + client: + type: browser + name: Chrome + version: 78.0.3904.108 + engine: Blink + engine_version: 78.0.3904.108 + device: + type: tablet + brand: Logicom + model: M BOT Tab 10 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; TEO13P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.73 Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome + version: 77.0.3865.73 + engine: Blink + engine_version: 77.0.3865.73 + device: + type: tablet + brand: Thomson + model: TEO13P + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; TEO10S) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.136 Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome + version: 79.0.3945.136 + engine: Blink + engine_version: 79.0.3945.136 + device: + type: tablet + brand: Thomson + model: TEO10S + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; TF501_EC) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome + version: 80.0.3987.149 + engine: Blink + engine_version: 80.0.3987.149 + device: + type: tablet + brand: Telefunken + model: TF501 EC + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Tab8Plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.111 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 81.0.4044.111 + engine: Blink + engine_version: 81.0.4044.111 + device: + type: tablet + brand: Masstel + model: Tab 8 Plus + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; TAB7Q804VAL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome + version: 78.0.3904.108 + engine: Blink + engine_version: 78.0.3904.108 + device: + type: tablet + brand: VALTECH + model: TAB-7Q804VAL + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; TAB7A3G05) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.116 Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome + version: 79.0.3945.116 + engine: Blink + engine_version: 79.0.3945.116 + device: + type: tablet + brand: Sankey + model: TAB-7A3G05 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Tab7Plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.117 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 81.0.4044.117 + engine: Blink + engine_version: 81.0.4044.117 + device: + type: tablet + brand: Masstel + model: Tab 7 Plus + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; TAB5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.81 Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome + version: 85.0.4183.81 + engine: Blink + engine_version: 85.0.4183.81 + device: + type: tablet + brand: GIRASOLE + model: TAB5 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Tab10Plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 102.0.0.0 + engine: Blink + engine_version: 102.0.0.0 + device: + type: tablet + brand: Masstel + model: Tab 10 Plus + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; TAB1081) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome + version: 80.0.3987.162 + engine: Blink + engine_version: 80.0.3987.162 + device: + type: tablet + brand: Sunstech + model: TAB1081 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; TAB-S1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.111 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 81.0.4044.111 + engine: Blink + engine_version: 81.0.4044.111 + device: + type: tablet + brand: MOVISUN + model: TAB-S1 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; T7A6INC) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.117 Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome + version: 80.0.3987.117 + engine: Blink + engine_version: 80.0.3987.117 + device: + type: tablet + brand: Noblex + model: T7A6INC + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; T3G_04) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.117 Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome + version: 81.0.4044.117 + engine: Blink + engine_version: 81.0.4044.117 + device: + type: tablet + brand: Samtech + model: T3G 04 + os_family: Android + browser_family: Chrome diff --git a/Tests/fixtures/tv-2.yml b/Tests/fixtures/tv-2.yml index ca4d43c556..1bfb886d7f 100644 --- a/Tests/fixtures/tv-2.yml +++ b/Tests/fixtures/tv-2.yml @@ -17,3 +17,57 @@ model: TV Air os_family: Android browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 9; NV720WB) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 + os: + name: Android + version: "9" + platform: "" + client: + type: browser + name: Chrome + version: 108.0.0.0 + engine: Blink + engine_version: 108.0.0.0 + device: + type: tv + brand: Eltex + model: NV-720-WB + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 7.1.2; LPX-G BOX MAX) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.96 Safari/537.36 + os: + name: Android + version: 7.1.2 + platform: "" + client: + type: browser + name: Chrome + version: 78.0.3904.96 + engine: Blink + engine_version: 78.0.3904.96 + device: + type: tv + brand: LPX-G + model: Box Max + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; TF500) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome + version: 80.0.3987.149 + engine: Blink + engine_version: 80.0.3987.149 + device: + type: tv + brand: Telefunken + model: TF500 + os_family: Android + browser_family: Chrome diff --git a/regexes/device/mobiles.yml b/regexes/device/mobiles.yml index d7971032ff..f958b916fe 100644 --- a/regexes/device/mobiles.yml +++ b/regexes/device/mobiles.yml @@ -5766,10 +5766,10 @@ Clarmin: # CORN (corn-mobile.com) CORN: - regex: 'CORN[_ ]|(?:C55 Pro|C60 Ultra|Fenix8_3G|Note1|Tronik_1)(?:[);/ ]|$)' + regex: 'CORN[_ ]|(?:C55 Pro|C60 Ultra|Fenix8_3G|Note1|Tronik_1|Star7 3G)(?:[);/ ]|$)' device: 'smartphone' models: - - regex: '(C55 Pro|C60 Ultra)(?:[);/ ]|$)' + - regex: '(C55 Pro|C60 Ultra|Star7 3G)(?:[);/ ]|$)' model: '$1' - regex: 'Fenix8_3G(?:[);/ ]|$)' model: 'Fenix 8 3G' @@ -7824,13 +7824,14 @@ EvroMedia: model: 'Play Pad 3G Note XL' # EKO EKO: - regex: 'EKO' + regex: 'EKO|Star (?:\d\.\d) (?:G65|G5[05]|G40)' device: 'smartphone' models: - regex: 'EKO Android TV 2K' model: '2K Android TV' device: 'tv' - + - regex: 'Star (\d\.\d) (G65|G5[05]|G40)' + model: 'Star $1 $2' - regex: 'EKO[ _-]?([^;/)]+) Build' model: '$1' - regex: 'EKO[ _-]?([^;/)]+)(?:[);/ ]|$)' @@ -13962,7 +13963,9 @@ Logicom: - regex: 'VR bot (552)' device: 'smartphone' model: 'VR BOT $1' - - regex: '((?:B|C|M|ID|VR))[ _]?BOT[ _]?((?:TAB[ _])?([0-9]+\+?)(?:PLUS)?)' + - regex: '((?:[BCM]|ID|VR))[ _]?BOT[ _]?TAB[ _]([0-9]+(?:PLUS|\+)?)' + model: '$1 BOT Tab $2' + - regex: '((?:[BCM]|ID|VR))[ _]?BOT[ _]?((?:TAB[ _])?([0-9]+\+?)(?:PLUS)?)' model: '$1 BOT $2' - regex: 'Le Lift' model: 'Le Lift' @@ -14316,7 +14319,7 @@ Manta Multimedia: # Masstel (masstel.vn) Masstel: - regex: 'Masstel|(?:Juno[ _]Q[567]|Tab10Ultra)(?:[);/ ]|$)' + regex: 'Masstel|(?:Juno[ _]Q[567]|Tab10Ultra|Tab(?:[78]|10)Plus)(?:[);/ ]|$)' device: 'smartphone' models: - regex: 'Masstel[_ ]Juno[_ ]Q5Plus' @@ -14337,6 +14340,9 @@ Masstel: - regex: 'Tab10Ultra' model: 'Tab 10 Ultra' device: 'tablet' + - regex: 'Tab([78]|10)Plus' + model: 'Tab $1 Plus' + device: 'tablet' - regex: '(?:Masstel[ _])?Tab[ _]?([^/);]+)(?: Build|[);])' model: 'Tab $1' device: 'tablet' @@ -15989,14 +15995,17 @@ Noain: # Noblex (https://noblex.com.ar/) Noblex: - regex: 'Noblex|NBX-|A[56]0UNS' + regex: 'Noblex|NBX-|(?:A[56]0UNS|T7A6INC)(?:[;/)]|$)' device: 'smartphone' models: - regex: '(?:Noblex|NBX)[ _-]([^;/]+) Build' model: '$1' - regex: '(?:Noblex|NBX)[ _-]([^;/)]+)(?:[;/)]|$)' model: '$1' - - regex: '(A[56]0)UNS(?:[;/)]|$)' + - regex: '(A[56]0)UNS' + model: '$1' + - regex: '(T7A6INC)' + device: 'tablet' model: '$1' # NOGA (https://noganet.ar/) @@ -20244,7 +20253,7 @@ SWISSMOBILITY: # Thomson Thomson: - regex: '(?:Primo(7|8)|QM73[45]-8G|QM734-2|QM736-8G\(HD\)|(?