diff --git a/readme.md b/readme.md index 4b11380..11ddec0 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # UAParser.py -#### fork of [UAParser.js](https://github.com/faisalman/ua-parser-js) +fork of [UAParser.js](https://github.com/faisalman/ua-parser-js) ![status](https://github.com/vitalibo/ua-parser-py/actions/workflows/ci.yaml/badge.svg) @@ -8,6 +8,12 @@ Python library to detect Browser, Engine, OS, CPU, and Device type/model from Us # Documentation +## Installation + +```sh +pip install ua-parser-py +``` + ## Constructor * `UAParser([uastring])` @@ -23,20 +29,23 @@ Python library to detect Browser, Engine, OS, CPU, and Device type/model from Us ```sh # Possible 'browser.name': -2345Explorer, 360 Browser, Amaya, Android Browser, Arora, Avant, Avast, AVG, -BIDUBrowser, Baidu, Basilisk, Blazer, Bolt, Brave, Bowser, Camino, Chimera, -Chrome Headless, Chrome WebView, Chrome, Chromium, Comodo Dragon, Dillo, -Dolphin, Doris, Edge, Electron, Epiphany, Facebook, Falkon, Fennec, Firebird, -Firefox [Reality], Flock, Flow, GSA, GoBrowser, ICE Browser, IE, IEMobile, IceApe, -IceCat, IceDragon, Iceweasel, Instagram, Iridium, Iron, Jasmine, K-Meleon, -Kindle, Klar, Konqueror, LBBROWSER, Line, Links, Lunascape, Lynx, MIUI Browser, -Maemo Browser, Maemo, Maxthon, MetaSr Midori, Minimo, Mobile Safari, Mosaic, -Mozilla, NetFront, NetSurf, Netfront, Netscape, NokiaBrowser, Obigo, Oculus Browser, -OmniWeb, Opera Coast, Opera [Mini/Mobi/Tablet], PaleMoon, PhantomJS, Phoenix, -Polaris, Puffin, QQ, QQBrowser, QQBrowserLite, Quark, QupZilla, RockMelt, Safari, -Sailfish Browser, Samsung Browser, SeaMonkey, Silk, Skyfire, Sleipnir, Slim, -SlimBrowser, Swiftfox, Tesla, Tizen Browser, UCBrowser, UP.Browser, Vivaldi, -Waterfox, WeChat, Weibo, Yandex, baidu, iCab, w3m, Whale Browser... +2345Explorer, 360 Browser, Alipay, Amaya, Android Browser, Arora, Avant, Avast, +AVG, Baidu, Basilisk, Blazer, Bolt, Brave, Bowser, Camino, Chimera, +Chrome Headless, Chrome WebView, Chrome, Chromium, Cobalt, Comodo Dragon, Dillo, +Dolphin, Doris, DuckDuckGo, Edge, Electron, Epiphany, Facebook, Falkon, Fennec, +Firebird, Firefox [Focus/Reality], Flock, Flow, GSA, GoBrowser, Heytap, +Huawei Browser, iCab, ICE Browser, IE, IEMobile, IceApe, IceCat, IceDragon, +Iceweasel, Instagram, Iridium, Iron, Jasmine, Kakao[Story/Talk], K-Meleon, +Kindle, Klar, Klarna, Konqueror, LBBROWSER, Line, LinkedIn, Links, Lunascape, +Lynx, MIUI Browser, Maemo, Maxthon, Midori, Minimo, Mobile Safari, Mosaic, +Mozilla, NetFront, NetSurf, Netfront, Netscape, NokiaBrowser, Obigo, +Oculus Browser, OmniWeb, Opera Coast, Opera [Mini/Mobi/Tablet], PaleMoon, +PhantomJS, Phoenix, Polaris, Puffin, QQ, QQBrowser, QQBrowserLite, Quark, +QupZilla, RockMelt, Safari, Sailfish Browser, Samsung Internet, SeaMonkey, Silk, +Skyfire, Sleipnir, Slim, SlimBrowser, Smart Lenovo Browser, Snapchat, +Sogou [Explorer/Mobile], Swiftfox, Tesla, TikTok, Tizen Browser, UCBrowser, +UP.Browser, Viera, Vivaldi, Vivo Browser, Waterfox, WeChat, Weibo, Yandex, w3m, +Whale Browser, ... # 'browser.version' determined dynamically ``` @@ -48,12 +57,20 @@ Waterfox, WeChat, Weibo, Yandex, baidu, iCab, w3m, Whale Browser... # Possible 'device.type': console, mobile, tablet, smarttv, wearable, embedded +########## +# NOTE: 'desktop' is not a possible device type. +# UAParser only reports info directly available from the UA string, which is not the case for 'desktop' device type. +# If you wish to detect desktop devices, you must handle the needed logic yourself. +# You can read more about it in this issue: https://github.com/faisalman/ua-parser-js/issues/182 +########## + # Possible 'device.vendor': Acer, Alcatel, Amazon, Apple, Archos, ASUS, AT&T, BenQ, BlackBerry, Dell, -Essential, Fairphone, GeeksPhone, Google, HP, HTC, Huawei, Jolla, Lenovo, LG, -Meizu, Microsoft, Motorola, Nexian, Nintendo, Nokia, Nvidia, OnePlus, OPPO, Ouya, -Palm, Panasonic, Pebble, Polytron, Realme, RIM, Roku, Samsung, Sharp, Siemens, -Sony[Ericsson], Sprint, Tesla, Vivo, Vodafone, Xbox, Xiaomi, Zebra, ZTE, ... +Essential, Facebook, Fairphone, GeeksPhone, Google, HP, HTC, Huawei, Infinix, +Jolla, Kobo, Lenovo, LG, Meizu, Microsoft, Motorola, Nexian, Nintendo, Nokia, +Nvidia, OnePlus, OPPO, Ouya, Palm, Panasonic, Pebble, Polytron, Realme, RIM, +Roku, Samsung, Sharp, Siemens, Sony[Ericsson], Sprint, Tecno, Tesla, Ulefone, +Vivo, Vodafone, Xbox, Xiaomi, Zebra, ZTE, ... # 'device.model' determined dynamically ``` @@ -63,8 +80,8 @@ Sony[Ericsson], Sprint, Tesla, Vivo, Vodafone, Xbox, Xiaomi, Zebra, ZTE, ... ```sh # Possible 'engine.name' -Amaya, Blink, EdgeHTML, Flow, Gecko, Goanna, iCab, KHTML, Links, Lynx, NetFront, -NetSurf, Presto, Tasman, Trident, w3m, WebKit +Amaya, Blink, EdgeHTML, Flow, Gecko, Goanna, iCab, KHTML, LibWeb, Links, Lynx, +NetFront, NetSurf, Presto, Tasman, Trident, w3m, WebKit # 'engine.version' determined dynamically ``` @@ -76,11 +93,13 @@ NetSurf, Presto, Tasman, Trident, w3m, WebKit # Possible 'os.name' AIX, Amiga OS, Android[-x86], Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS, Contiki, Fedora, Firefox OS, FreeBSD, Debian, Deepin, DragonFly, elementary OS, -Fuchsia, Gentoo, GhostBSD, GNU, Haiku, HP-UX, Hurd, iOS, Joli, KaiOS, Linpus, Linspire, -Linux, Mac OS, Maemo, Mageia, Mandriva, Manjaro, MeeGo, Minix, Mint, Morph OS, NetBSD, -Nintendo, OpenBSD, OpenVMS, OS/2, Palm, PC-BSD, PCLinuxOS, Plan9, PlayStation, QNX, -Raspbian, RedHat, RIM Tablet OS, RISC OS, Sabayon, Sailfish, Series40, Slackware, Solaris, -SUSE, Symbian, Tizen, Ubuntu, Unix, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk, ... +Fuchsia, Gentoo, GhostBSD, GNU, Haiku, HarmonyOS, HP-UX, Hurd, iOS, Joli, KaiOS, +Linpus, Linspire,Linux, Mac OS, Maemo, Mageia, Mandriva, Manjaro, MeeGo, Minix, +Mint, Morph OS, NetBSD, NetRange, NetTV, Nintendo, OpenBSD, OpenVMS, OS/2, Palm, +PC-BSD, PCLinuxOS, Plan9, PlayStation, QNX, Raspbian, RedHat, RIM Tablet OS, +RISC OS, Sabayon, Sailfish, SerenityOS, Series40, Slackware, Solaris, SUSE, +Symbian, Tizen, Ubuntu, Unix, VectorLinux, Viera, watchOS, WebOS, +Windows [Phone/Mobile], Zenwalk, ... # 'os.version' determined dynamically ``` @@ -90,7 +109,8 @@ SUSE, Symbian, Tizen, Ubuntu, Unix, VectorLinux, WebOS, Windows [Phone/Mobile], ```sh # Possible 'cpu.architecture' -68k, amd64, arm[64/hf], avr, ia[32/64], irix[64], mips[64], pa-risc, ppc, sparc[64] +68k, amd64, arm[64/hf], avr, ia[32/64], irix[64], mips[64], pa-risc, ppc, +sparc[64] ``` * `ua` diff --git a/tests/browser-test.json b/tests/browser-test.json index bd1f098..2240ea8 100644 --- a/tests/browser-test.json +++ b/tests/browser-test.json @@ -8,6 +8,24 @@ "major": null } }, + { + "desc": "Alipay", + "ua": "Mozilla/5.0 (Linux; U; Android 10; zh-CN; V2034A Build/QP1A.190711.020) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/69.0.3497.100 UWS/3.22.2.33 Mobile Safari/537.36 UCBS/3.22.2.33_211025173018 NebulaSDK/1.8.100112 Nebula AlipayDefined(nt:WIFI,ws:360|0|2.0) AliApp(AP/10.2.51.7100) AlipayClient/10.2.51.7100 Language/zh-Hans useStatusBar/true isConcaveScreen/true Region/CNAriver/1.0.0", + "expect": { + "name": "Alipay", + "version": "10.2.51.7100", + "major": "10" + } + }, + { + "desc": "Alipay", + "ua": "Mozilla/5.0 (Linux; Android 10; VOG-AL00 Build/HUAWEIVOG-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/105.0.5195.148 MYWeb/0.2.103.0_20230131112530 UWS/3.22.2.9999 UCBS/3.22.2.9999_220000000000 Mobile Safari/537.36 NebulaSDK/1.8.100112 Nebula AlipayDefined(nt:WIFI,ws:360|0|3.0) AliApp(AP/10.3.50.9999) AlipayClient/10.3.50.9999 Language/en isConcaveScreen/true Region/CN ProductType/devAriver/1.0.0", + "expect": { + "name": "Alipay", + "version": "10.3.50.9999", + "major": "10" + } + }, { "desc": "Android Browser on Galaxy Nexus", "ua": "Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", @@ -57,7 +75,7 @@ "desc": "Android Browser on Samsung S6 (SM-G925F)", "ua": "Mozilla/5.0 (Linux; Android 5.0.2; SAMSUNG SM-G925F Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.0 Chrome/38.0.2125.102 Mobile Safari/537.36", "expect": { - "name": "Samsung Browser", + "name": "Samsung Internet", "version": "3.0", "major": "3" } @@ -84,7 +102,7 @@ "desc": "Avant", "ua": "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB5; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)", "expect": { - "name": "Avant ", + "name": "Avant", "version": null, "major": null } @@ -111,11 +129,65 @@ "desc": "Baidu", "ua": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; baidubrowser 1.x)", "expect": { - "name": "baidubrowser", + "name": "Baidu", "version": "1.x", "major": "1" } }, + { + "desc": "Baidu", + "ua": "Mozilla/5.0 (Linux; Android 9; Redmi Note 5 Build/PKQ1.180904.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/110.0.5481.153 Mobile Safari/537.36 bdbrowser/6.4.0.4", + "expect": { + "name": "Baidu", + "version": "6.4.0.4", + "major": "6" + } + }, + { + "desc": "Baidu", + "ua": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.4.9999.1900 Safari/537.31 BDSpark/26.4", + "expect": { + "name": "Baidu", + "version": "26.4", + "major": "26" + } + }, + { + "desc": "Baidu", + "ua": "Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) BaiduHD/5.4.0.0 Mobile/10A406 Safari/8536.25", + "expect": { + "name": "Baidu", + "version": "5.4.0.0", + "major": "5" + } + }, + { + "desc": "BaiDu Browser", + "ua": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 BIDUBrowser/8.7 Safari/537.36", + "expect": { + "name": "Baidu", + "version": "8.7", + "major": "8" + } + }, + { + "desc": "baidu app on iOS", + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16C101 main%2F1.0 baiduboxapp/11.12.0.18 (Baidu; P2 12.1.2)", + "expect": { + "name": "Baidu", + "version": "11.12.0.18", + "major": "11" + } + }, + { + "desc": "baidu app on Android", + "ua": "Mozilla/5.0 (Linux; Android 8.1.0; BKK-AL10 Build/HONORBKK-AL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.11 baiduboxapp/11.11.0.0 (Baidu; P1 8.1.0)", + "expect": { + "name": "Baidu", + "version": "11.11.0.0", + "major": "11" + } + }, { "desc": "Bolt", "ua": "Mozilla/5.0 (X11; 78; CentOS; US-en) AppleWebKit/527+ (KHTML, like Gecko) Bolt/0.862 Version/3.0 Safari/523.15", @@ -170,6 +242,51 @@ "major": "20" } }, + { + "desc": "Chrome", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4758.102 Safari/537.36", + "expect": { + "name": "Chrome", + "version": "100.0.4758.102", + "major": "100" + } + }, + { + "desc": "Chrome 112.0 on Win10", + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36", + "expect": { + "name": "Chrome", + "version": "112.0.0.0", + "major": "112" + } + }, + { + "desc": "Chrome 112.0 on macOS", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36", + "expect": { + "name": "Chrome", + "version": "112.0.0.0", + "major": "112" + } + }, + { + "desc": "Chrome 111.0 on Linux", + "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36", + "expect": { + "name": "Chrome", + "version": "111.0.0.0", + "major": "111" + } + }, + { + "desc": "Chrome 111.0 on ChromeOS", + "ua": "Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36", + "expect": { + "name": "Chrome", + "version": "111.0.0.0", + "major": "111" + } + }, { "desc": "Chrome Headless", "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome Safari/537.36", @@ -260,6 +377,15 @@ "major": "1" } }, + { + "desc": "DuckDuckGo", + "ua": "Mozilla/5.0 (Linux; Android 8.1.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.131 Mobile DuckDuckGo/5 Safari/537.36", + "expect": { + "name": "DuckDuckGo", + "version": "5", + "major": "5" + } + }, { "desc": "Epiphany", "ua": "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040628 Epiphany/1.2.6", @@ -332,6 +458,24 @@ "major": null } }, + { + "desc": "Klarna in-App Browser for iOS", + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Klarna/23.36.223", + "expect": { + "name": "Klarna", + "version": "23.36.223", + "major": "23" + } + }, + { + "desc": "Klarna in-App Browser for Android", + "ua": "Mozilla/5.0 (Linux; Android 12; moto g(60)s Build/S3RLS32.114-25-13; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 Klarna/23.36.215", + "expect": { + "name": "Klarna", + "version": "23.36.215", + "major": "23" + } + }, { "desc": "Instagram in-App Browser for iOS", "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Instagram 142.0.0.22.109 (iPhone12,5; iOS 14_1; en_US; en-US; scale=3.00; 1242x2688; 214888322) NW/1", @@ -368,6 +512,15 @@ "major": "15" } }, + { + "desc": "Firefox", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0", + "expect": { + "name": "Firefox", + "version": "100.0", + "major": "100" + } + }, { "desc": "Firefox Reality", "ua": "Mozilla/5.0 (Android 7.1.2; Mobile VR; rv:65.0) Gecko/65.0 Firefox/65.0", @@ -431,6 +584,42 @@ "major": "1" } }, + { + "desc": "HuaweiBrowser", + "ua": "Mozilla/5.0 (Linux; Android 6.0.1; LYA-AL00;HMSCore/4.0.0 GMS/10.4 ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.64 HuaweiBrowser/10.0.3.102 Mobile Safari/537.36", + "expect": { + "name": "Huawei Browser", + "version": "10.0.3.102", + "major": "10" + } + }, + { + "desc": "HuaweiBrowser", + "ua": "Mozilla/5.0 (Linux; Android 6.0.1; LYA-AL00;HMSCore/4.0.0 ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.64 HuaweiBrowser/10.0.3.102 Mobile Safari/537.36", + "expect": { + "name": "Huawei Browser", + "version": "10.0.3.102", + "major": "10" + } + }, + { + "desc": "HuaweiBrowser", + "ua": "Mozilla/5.0 (Linux; Android 6.0.1; LYA-AL00;GMS/10.4 ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.64 HuaweiBrowser/10.0.3.102 Mobile Safari/537.36", + "expect": { + "name": "Huawei Browser", + "version": "10.0.3.102", + "major": "10" + } + }, + { + "desc": "HuaweiBrowser", + "ua": "Mozilla/5.0 (Linux; Android 6.0.1; LYA-AL00 ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.64 HuaweiBrowser/10.0.3.102 Mobile Safari/537.36", + "expect": { + "name": "Huawei Browser", + "version": "10.0.3.102", + "major": "10" + } + }, { "desc": "IceApe", "ua": "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.19) Gecko/20110817 Iceape/2.0.14", @@ -530,6 +719,24 @@ "major": "5" } }, + { + "desc": "Smart Lenovo Browser", + "ua": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36 SLBrowser/8.0.0.10171 SLBChan/8", + "expect": { + "name": "Smart Lenovo Browser", + "version": "8.0.0.10171", + "major": "8" + } + }, + { + "desc": "Smart Lenovo Browser", + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 SLBrowser/9.0.0.9011 SLBChan/10", + "expect": { + "name": "Smart Lenovo Browser", + "version": "9.0.0.9011", + "major": "9" + } + }, { "desc": "LINE on Android", "ua": "Mozilla/5.0 (Linux; Android 5.0; ASUS_Z00AD Build/LRX21V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/51.0.2704.81 Mobile Safari/537.36 Line/6.5.1/IAB", @@ -900,10 +1107,37 @@ } }, { - "desc": "Samsung Browser", + "desc": "Samsung Internet for Android", "ua": "Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG-SM-G925A Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36", "expect": { - "name": "Samsung Browser", + "name": "Samsung Internet", + "version": "4.0", + "major": "4" + } + }, + { + "desc": "Samsung Internet for Tizen Mobile", + "ua": "Mozilla/5.0 (Linux; Tizen 2.3; SAMSUNG SM-Z130H) AppleWebKit/537.3 (KHTML, like Gecko) SamsungBrowser/1.0 Mobile Safari/537.3", + "expect": { + "name": "Samsung Internet", + "version": "1.0", + "major": "1" + } + }, + { + "desc": "Samsung Internet for Smart-TV", + "ua": "Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1", + "expect": { + "name": "Samsung Internet", + "version": "1.0", + "major": "1" + } + }, + { + "desc": "Samsung Internet for Gear VR", + "ua": "Mozilla/5.0 (Linux; Android 5.0.2; SAMSUNG SM-G925K Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile VR Safari/537.36", + "expect": { + "name": "Samsung Internet", "version": "4.0", "major": "4" } @@ -1071,7 +1305,7 @@ } }, { - "desc": "WeChat on Android", + "desc": "WeiBo on Android", "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16A366 Weibo (iPhone8,2__weibo__8.9.3__iphone__os12.0)", "expect": { "name": "weibo", @@ -1088,6 +1322,33 @@ "major": "1" } }, + { + "desc": "Vivaldi on Mac", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.88 Safari/537.36 Vivaldi/2.4.1488.36", + "expect": { + "name": "Vivaldi", + "version": "2.4.1488.36", + "major": "2" + } + }, + { + "desc": "Vivo Browser", + "ua": "Mozilla/5.0 (Linux; Android 13; 23049RAD8C; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.141 Mobile Safari/537.36 VivoBrowser/16.7.1.1", + "expect": { + "name": "Vivo Browser", + "version": "16.7.1.1", + "major": "16" + } + }, + { + "desc": "Viera", + "ua": "HbbTV/1.2.1 (;Panasonic;VIERA 2015;3.014;a001-003 4000-0000;)", + "expect": { + "name": "VIERA", + "version": null, + "major": null + } + }, { "desc": "Yandex", "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.5 (KHTML, like Gecko) YaBrowser/1.0.1084.5402 Chrome/19.0.1084.5402 Safari/536.5", @@ -1097,6 +1358,60 @@ "major": "1" } }, + { + "desc": "Yandex", + "ua": "Mozilla/5.0 (Linux; arm_64; Android 11; M2101K7AG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.125 YaApp_Android/22.70 YaSearchBrowser/22.70 BroPP/1.0 SA/3 Mobile Safari/537.36", + "expect": { + "name": "Yandex", + "version": "22.70", + "major": "22" + } + }, + { + "desc": "Yandex", + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 YaBrowser/23.3.0.2246 Yowser/2.5 Safari/537.36", + "expect": { + "name": "Yandex", + "version": "23.3.0.2246", + "major": "23" + } + }, + { + "desc": "Yandex on Android", + "ua": "Mozilla/5.0 (Linux; arm_64; Android 13; SM-G965F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.5672.76 YaBrowser/21.3.4.59 Mobile Safari/537.36", + "expect": { + "name": "Yandex", + "version": "21.3.4.59", + "major": "21" + } + }, + { + "desc": "Yandex on iPhone", + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 YaBrowser/23.3.3.330 Mobile/15E148 Safari/604.1", + "expect": { + "name": "Yandex", + "version": "23.3.3.330", + "major": "23" + } + }, + { + "desc": "Yandex on iPad", + "ua": "Mozilla/5.0 (iPad; CPU OS 16_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 YaBrowser/23.3.3.330 Mobile/15E148 Safari/605.1", + "expect": { + "name": "Yandex", + "version": "23.3.3.330", + "major": "23" + } + }, + { + "desc": "Yandex on iPod", + "ua": "Mozilla/5.0 (iPod touch; CPU iPhone 16_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 YaBrowser/23.3.3.330 Mobile/15E148 Safari/605.1", + "expect": { + "name": "Yandex", + "version": "23.3.3.330", + "major": "23" + } + }, { "desc": "Puffin", "ua": "Mozilla/5.0 (Linux; Android 6.0.1; Lenovo P2a42 Build/MMB29M; en-us) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Mobile Safari/537.36 Puffin/6.0.8.15804AP", @@ -1133,6 +1448,15 @@ "major": "18" } }, + { + "desc": "Microsoft Edge 100", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.1108.55 Safari/537.36 Edg/100.0.1108.55", + "expect": { + "name": "Edge", + "version": "100.0.1108.55", + "major": "100" + } + }, { "desc": "Microsoft Edge on iOS", "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 EdgiOS/42.1.1.0 Mobile/15F79 Safari/605.1.15", @@ -1178,6 +1502,15 @@ "major": "1" } }, + { + "desc": "Firefox on iOS", + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/112.0 Mobile/15E148 Safari/605.1.15", + "expect": { + "name": "Firefox", + "version": "112.0", + "major": "112" + } + }, { "desc": "Firefox iOS using iPad", "ua": "Mozilla/5.0 (iPad; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) FxiOS/1.0 Mobile/12F69 Safari/600.1.4", @@ -1205,29 +1538,11 @@ "major": "6" } }, - { - "desc": "baidu app on iOS", - "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16C101 main%2F1.0 baiduboxapp/11.12.0.18 (Baidu; P2 12.1.2)", - "expect": { - "name": "baiduboxapp", - "version": "11.12.0.18", - "major": "11" - } - }, - { - "desc": "baidu app on Android", - "ua": "Mozilla/5.0 (Linux; Android 8.1.0; BKK-AL10 Build/HONORBKK-AL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.11 baiduboxapp/11.11.0.0 (Baidu; P1 8.1.0)", - "expect": { - "name": "baiduboxapp", - "version": "11.11.0.0", - "major": "11" - } - }, { "desc": "WeChat Desktop for Windows Built-in Browser", "ua": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 MicroMessenger/6.5.2.501 NetType/WIFI WindowsWechat QBCore/3.43.901.400 QQBrowser/9.0.2524.400", "expect": { - "name": "WeChat(Win) Desktop", + "name": "WeChat", "version": "3.43.901.400", "major": "3" } @@ -1236,11 +1551,20 @@ "desc": "WeChat Desktop for Windows Built-in Browser major version in 4", "ua": "mozilla/5.0 (windows nt 10.0; wow64) applewebkit/537.36 (khtml, like gecko) chrome/53.0.2785.116 safari/537.36 qbcore/4.0.1301.400 qqbrowser/9.0.2524.400 mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/81.0.4044.138 safari/537.36 nettype/wifi micromessenger/7.0.20.1781(0x6700143b) windowswechat", "expect": { - "name": "WeChat(Win) Desktop", + "name": "WeChat", "version": "4.0.1301.400", "major": "4" } }, + { + "desc": "Supposed not to be detected as WeChat", + "ua": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.124 Safari/537.36 qblink wegame.exe WeGame/5.1.1.11100 QBCore/3.70.107.400 QQBrowser/9.0.2524.400", + "expect": { + "name": "QQBrowser", + "version": "9.0.2524.400", + "major": "9" + } + }, { "desc": "GSA on iOS", "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) GSA/30.1.161623614 Mobile/14F89 Safari/602.1", @@ -1254,9 +1578,18 @@ "desc": "Sogou Browser", "ua": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.221 Safari/537.36 SE 2.X MetaSr 1.0", "expect": { - "name": "MetaSr", - "version": null, - "major": null + "name": "Sogou Explorer", + "version": "1.0", + "major": "1" + } + }, + { + "desc": "Sogou Mobile Browser", + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 SogouMSE,SogouMobileBrowser/3.7.4", + "expect": { + "name": "Sogou Mobile", + "version": "3.7.4", + "major": "3" } }, { @@ -1268,15 +1601,6 @@ "major": null } }, - { - "desc": "BaiDu Browser", - "ua": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 BIDUBrowser/8.7 Safari/537.36", - "expect": { - "name": "BIDUBrowser", - "version": "8.7", - "major": "8" - } - }, { "desc": "2345 Browser", "ua": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.90 Safari/537.36 2345Explorer/9.2.1.17116", @@ -1321,5 +1645,185 @@ "version": "4.2.7", "major": "4" } + }, + { + "desc": "IE11 on Windows 7 (ua length >255)", + "ua": "Mozilla/5.0 (Windows NT 6.1; WOW64; APCPMS=^N201205020840572565478A37A6F9C41BD33F_9975^; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; MARKANYEPS#25118; Zoom 3.6.0; rv:11.0) like Gecko", + "expect": { + "name": "IE", + "version": "11.0", + "major": "11" + } + }, + { + "desc": "LinkedIn", + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [LinkedInApp]", + "expect": { + "name": "LinkedIn", + "version": null, + "major": null + } + }, + { + "desc": "Safari including comma in minor version number", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6,2 Safari/605.1.15", + "expect": { + "name": "Safari", + "version": "15.6,2", + "major": "15" + } + }, + { + "desc": "Mobile Safari including comma in minor version number", + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6,2 Mobile/15E148 Safari/604.1", + "expect": { + "name": "Mobile Safari", + "version": "15.6,2", + "major": "15" + } + }, + { + "desc": "Cobalt 23 Master", + "ua": "Mozilla/5.0 (X11; Linux x86_64) Cobalt/23.master.0.0-devel (unlike Gecko) v8/8.8.278.8-jit gles Starboard/15", + "expect": { + "name": "Cobalt", + "version": "23.0.0", + "major": "23" + } + }, + { + "desc": "Cobalt 23 LTS", + "ua": "Mozilla/5.0 (X11; Linux x86_64) Cobalt/23.lts.1.0-qa (unlike Gecko) v8/8.8.278.8-jit gles Starboard/15", + "expect": { + "name": "Cobalt", + "version": "23.1.0", + "major": "23" + } + }, + { + "desc": "Cobalt 11", + "ua": "Mozilla/5.0 (X11; Linux x86_64) Cobalt/11.0-qa (unlike Gecko) Starboard/6", + "expect": { + "name": "Cobalt", + "version": "11.0", + "major": "11" + } + }, + { + "desc": "Cobalt 9", + "ua": "Mozilla/5.0 (X11; Linux x86_64) Cobalt/9.0-qa (unlike Gecko) Starboard/4", + "expect": { + "name": "Cobalt", + "version": "9.0", + "major": "9" + } + }, + { + "desc": "KakaoTalk App Android", + "ua": "Mozilla/5.0 (Linux; Android 12; SM-G988N Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/100.0.4896.79 Mobile Safari/537.36;KAKAOTALK 2409760", + "expect": { + "name": "KAKAOTALK", + "version": "2409760", + "major": "2409760" + } + }, + { + "desc": "KakaoStory App Android", + "ua": "Mozilla/5.0 (Linux; Android 12; SM-G988N Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/100.0.4896.79 Mobile Safari/537.36 KAKAOSTORY/6.8.3_21046", + "expect": { + "name": "KAKAOSTORY", + "version": "6.8.3_21046", + "major": "6" + } + }, + { + "desc": "KakaoTalk App iOS", + "ua": "Mozilla/5.0 (iPhone; CPU; iPhone OS 15_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 BizWebView KAKAOTALK 9.7.6", + "expect": { + "name": "KAKAOTALK", + "version": "9.7.6", + "major": "9" + } + }, + { + "desc": "Naver App Android", + "ua": "Mozilla/5.0 (Linux; Android 12; SM-G988N Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/90.0.4430.232 Whale/1.0.0.0 Crosswalk/26.90.3.21 Mobile Safari/537.36 NAVER(inapp; search; 1010; 11.11.2)", + "expect": { + "name": "NAVER", + "version": "11.11.2", + "major": "11" + } + }, + { + "desc": "Naver App iOS", + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Mobile/15E148 Safari/605.1 NAVER(inapp; search; 720; 10.25.0; 11PRO)", + "expect": { + "name": "NAVER", + "version": "10.25.0", + "major": "10" + } + }, + { + "desc": "TikTok", + "ua": "Mozilla/5.0 (Linux; Android 11; 21061119AG Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.131 Mobile Safari/537.36 trill_2022109040 JsSdk/1.0 NetType/MOBILE Channel/googleplay AppName/musical_ly app_version/21.9.4 ByteLocale/ru-RU ByteFullLocale/ru-RU Region/KG BytedanceWebview/d8a21c6", + "expect": { + "name": "TikTok", + "version": "21.9.4", + "major": "21" + } + }, + { + "desc": "TikTok", + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 musical_ly_21.1.0 JsSdk/2.0 NetType/4G Channel/App Store ByteLocale/ru Region/RU ByteFullLocale/ru-RU isDarkMode/1 WKWebView/1 BytedanceWebview/d8a21c6", + "expect": { + "name": "TikTok", + "version": "21.1.0", + "major": "21" + } + }, + { + "desc": "TikTok", + "ua": "Mozilla/5.0 (Linux; Android 10; STK-LX1 Build/HONORSTK-LX1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/110.0.5481.153 Mobile Safari/537.36 musical_ly_2022803040 JsSdk/1.0 NetType/WIFI Channel/huaweiadsglobal_int AppName/musical_ly app_version/28.3.4 ByteLocale/en ByteFullLocale/en Region/IQ Spark/1.2.7-alpha.8 AppVersion/28.3.4 PIA/1.5.11 BytedanceWebview/d8a21c6", + "expect": { + "name": "TikTok", + "version": "28.3.4", + "major": "28" + } + }, + { + "desc": "Chrome Mobile", + "ua": "Mozilla/5.0 (Linux; Android 7.1.2; Nexus 5X Build/N2G47W) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36", + "expect": { + "name": "Chrome", + "version": "58.0.3029.83", + "major": "58" + } + }, + { + "desc": "Firefox Mobile", + "ua": "Mozilla/5.0 (Linux; Android 7.1.2; Nexus 5X Build/N2G47W) AppleWebKit/537.36 (KHTML, like Gecko) FxiOS/7.5b3349 Mobile/14F89 Safari/603.2.4", + "expect": { + "name": "Firefox", + "version": "7.5b3349", + "major": "7" + } + }, + { + "desc": "Firefox Mobile", + "ua": "Mozilla/5.0 (Android 5.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0", + "expect": { + "name": "Firefox", + "version": "41.0", + "major": "41" + } + }, + { + "desc": "Snapchat", + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Snapchat/12.33.0.36 (like Safari/8614.1.25.0.31, panda)", + "expect": { + "name": "Snapchat", + "version": "12.33.0.36", + "major": "12" + } } ] diff --git a/tests/cpu-test.json b/tests/cpu-test.json index f9a308f..e4dec75 100644 --- a/tests/cpu-test.json +++ b/tests/cpu-test.json @@ -20,6 +20,41 @@ "architecture": "amd64" } }, + { + "desc": "Vivaldi on Windows", + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Vivaldi/6.0.2979.18", + "expect": { + "architecture": "amd64" + } + }, + { + "desc": "Vivaldi on Windows", + "ua": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Vivaldi/6.0.2979.18", + "expect": { + "architecture": "amd64" + } + }, + { + "desc": "Vivaldi on Linux", + "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Vivaldi/6.0.2979.18", + "expect": { + "architecture": "amd64" + } + }, + { + "desc": "Vivaldi on Linux", + "ua": "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Vivaldi/6.0.2979.18", + "expect": { + "architecture": "ia32" + } + }, + { + "desc": "Xiaomi POCO M2 Pro", + "ua": "Mozilla/5.0 (Linux; arm_64; Android 11; POCO M2 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 YaBrowser/22.11.7.42.00 SA/3 Mobile Safari/537.36", + "expect": { + "architecture": "arm64" + } + }, { "desc": "win64", "ua": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Win64; x64; Trident/6.0; .NET4.0E; .NET4.0C)", diff --git a/tests/device-test.json b/tests/device-test.json index 84c5431..23907d5 100644 --- a/tests/device-test.json +++ b/tests/device-test.json @@ -1,4 +1,13 @@ [ + { + "desc": "K", + "ua": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": null, + "model": "K", + "type": "mobile" + } + }, { "desc": "ASUS Nexus 7", "ua": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 7 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Safari/537.36", @@ -188,6 +197,15 @@ "type": "mobile" } }, + { + "desc": "Blackview 4900Pro", + "ua": "Mozilla/5.0 (Linux; Android 12; BV4900Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": null, + "model": "BV4900Pro", + "type": "mobile" + } + }, { "desc": "Desktop (IE11 with Tablet string)", "ua": "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; Tablet PC 2.0; GWX:MANAGED; rv:11.0) like Gecko", @@ -197,6 +215,15 @@ "type": null } }, + { + "desc": "Mobile (DuckDuckGo mobile browser)", + "ua": "Mozilla/5.0 (Linux; Android 8.1.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.131 Mobile DuckDuckGo/5 Safari/537.36", + "expect": { + "vendor": null, + "model": null, + "type": "mobile" + } + }, { "desc": "Essential PH-1", "ua": "Mozilla/5.0 (Linux; Android 9; PH-1 Build/PPR1.180905.036) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.86 Mobile Safari/537.36", @@ -269,6 +296,24 @@ "type": "mobile" } }, + { + "desc": "Huawei Honor 20 Pro", + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L41) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "YAL-L41", + "type": "mobile" + } + }, + { + "desc": "Huawei Honor 20 Pro", + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-AL10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "YAL-AL10", + "type": "mobile" + } + }, { "desc": "Huawei Nexus 6P", "ua": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 6P Build/MTC19V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.81 Mobile Safari/537", @@ -422,6 +467,51 @@ "type": "mobile" } }, + { + "desc": "Huawei Mate 20 Pro", + "ua": "Mozilla/5.0 (Linux; Android 9; LYA-AL10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.90 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "LYA-AL10", + "type": "mobile" + } + }, + { + "desc": "Huawei Mate 20 Pro", + "ua": "Mozilla/5.0 (Linux; Android 9; LYA-L0C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.90 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "LYA-L0C", + "type": "mobile" + } + }, + { + "desc": "Huawei Mate 20 Pro", + "ua": "Mozilla/5.0 (Linux; Android 9; LYA-L29) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.90 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "LYA-L29", + "type": "mobile" + } + }, + { + "desc": "Huawei Mate 20 Pro", + "ua": "Mozilla/5.0 (Linux; Android 9; LYA-TL00) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.90 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "LYA-TL00", + "type": "mobile" + } + }, + { + "desc": "Huawei Mate 50 Pro", + "ua": "Mozilla/5.0 (Linux; Android 12; DCO-LX9) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "DCO-LX9", + "type": "mobile" + } + }, { "desc": "Huawei P20 Lite", "ua": "Mozilla/5.0 (Linux; Android 8.0.0; ANE-LX1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.143 Mobile Safari/537.36", @@ -503,6 +593,69 @@ "type": "mobile" } }, + { + "desc": "Huawei Nova 5T", + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L21) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "YAL-L21", + "type": "mobile" + } + }, + { + "desc": "Huawei Nova 5T", + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L61) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "YAL-L61", + "type": "mobile" + } + }, + { + "desc": "Huawei Nova 5T", + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L71) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "YAL-L71", + "type": "mobile" + } + }, + { + "desc": "Huawei Nova 5T", + "ua": "Mozilla/5.0 (Linux; Android 10; YAL-L61D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "YAL-L61D", + "type": "mobile" + } + }, + { + "desc": "Huawei Nova 5T", + "ua": "Mozilla/5.0 (Linux; Android 10; YALE-L61A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "YALE-L61A", + "type": "mobile" + } + }, + { + "desc": "Huawei Nova 5T", + "ua": "Mozilla/5.0 (Linux; Android 10; YALE-L61D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "YALE-L61D", + "type": "mobile" + } + }, + { + "desc": "Huawei Nova 5T", + "ua": "Mozilla/5.0 (Linux; Android 10; YALE-L71A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Mobile Safari/537.36", + "expect": { + "vendor": "Huawei", + "model": "YALE-L71A", + "type": "mobile" + } + }, { "desc": "Huawei Enjoy10e", "ua": "Dalvik/2.1.0 (Linux; U; Android 10; MED-AL00 Build/HUAWEIMED-AL00)", @@ -629,6 +782,69 @@ "type": "mobile" } }, + { + "desc": "Infinix Hot 7 Pro", + "ua": "Mozilla/5.0 (Linux; Android 9; Infinix X625C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Infinix", + "model": "X625C", + "type": "mobile" + } + }, + { + "desc": "Infinix Hot 10T", + "ua": "Mozilla/5.0 (Linux; Android 11; Infinix X689C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Infinix", + "model": "X689C", + "type": "mobile" + } + }, + { + "desc": "Infinix Hot 11s", + "ua": "Mozilla/5.0 (Linux; Android 11; Infinix X6812 Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/111.0.5563.116 Mobile Safari/537.36", + "expect": { + "vendor": "Infinix", + "model": "X6812", + "type": "mobile" + } + }, + { + "desc": "Infinix Smart 5", + "ua": "Mozilla/5.0 (Linux; Android 10; Infinix X657C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Infinix", + "model": "X657C", + "type": "mobile" + } + }, + { + "desc": "Infinix Zero 5G", + "ua": "Mozilla/5.0 (Linux; Android 12; Infinix X6815B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Infinix", + "model": "X6815B", + "type": "mobile" + } + }, + { + "desc": "Apple Desktop", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15", + "expect": { + "vendor": "Apple", + "model": "Macintosh", + "type": null + } + }, + { + "desc": "Apple Watch", + "ua": "atc/1.0 watchOS/7.3.3 model/Watch4,2 hwp/t8006 build/18S830 (6; dt:191)", + "expect": { + "vendor": "Apple", + "model": "watch", + "type": "wearable" + } + }, { "desc": "iPad using UCBrowser", "ua": "Mozilla/5.0 (iPad; U; CPU OS 11_2 like Mac OS X; zh-CN; iPad5,3) AppleWebKit/534.46 (KHTML, like Gecko) UCBrowser/3.0.1.776 U3/ Mobile/10A403 Safari/7543.48.3", @@ -665,6 +881,42 @@ "type": "mobile" } }, + { + "desc": "JVC LT-43V55LFA Smart TV", + "ua": "Mozilla/5.0 (Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 OPR/40.0.2207.0 OMI/4.9.0.237.DOM3-OPT.245 Model/Vestel-MB211 VSTVB MB200 HbbTV/1.2.1 (; JVC; MB211; 3.19.4.2; _TV_NT72563_2017 SmartTvA/3.0.0", + "expect": { + "vendor": "JVC", + "model": "MB211", + "type": "smarttv" + } + }, + { + "desc": "JVC LT-43V65LUA Smart TV", + "ua": "Mozilla/5.0 (Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 OPR/40.0.2207.0 OMI/4.9.0.237.DOM3-OPT.245 Model/Vestel-MB130 VSTVB MB100 HbbTV/1.2.1 (; JVC; MB130; 5.7.20.0; _TV_G10_2017;) SmartTvA/3.0.0", + "expect": { + "vendor": "JVC", + "model": "MB130", + "type": "smarttv" + } + }, + { + "desc": "Kobo eReader", + "ua": "Mozilla/5.0 (Unknown; Linux) AppleWebKit/538.1 (KHTML, like Gecko) Kobo eReader Safari/538.1", + "expect": { + "vendor": "Kobo", + "model": "eReader", + "type": "tablet" + } + }, + { + "desc": "Kobo Touch", + "ua": "Mozilla/5.0 (Linux; U; Android 2.0; en-us;) AppleWebKit/538.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/538.1 (Kobo Touch 0377/4.20.14622)", + "expect": { + "vendor": "Kobo", + "model": "Touch", + "type": "tablet" + } + }, { "desc": "Lenovo Tab 2", "ua": "Mozilla/5.0 (Linux; Android 5.0.1; Lenovo TAB 2 A7-30HC Build/LRX21M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.157 Safari/537.36", @@ -755,6 +1007,24 @@ "type": "mobile" } }, + { + "desc": "LG K40", + "ua": "Mozilla/5.0 (Linux; Android 10; LM-X420) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.5563.57 Mobile Safari/537.36", + "expect": { + "vendor": "LG", + "model": "LM-X420", + "type": "mobile" + } + }, + { + "desc": "LG Stylo 4", + "ua": "Mozilla/5.0 (Linux; Android 10; LM-Q710(FGN)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.5563.57 Mobile Safari/537.36", + "expect": { + "vendor": null, + "model": "LM-Q710(FGN)", + "type": "mobile" + } + }, { "desc": "LG Stylo 5", "ua": "Mozilla/5.0 (Linux; Android 9; LM-Q720) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.96 Mobile Safari/537.36", @@ -773,6 +1043,15 @@ "type": "mobile" } }, + { + "desc": "LG K20", + "ua": "Mozilla/5.0 (Android 13; Mobile; LG-M255; rv:111.0) Gecko/111.0 Firefox/111.0", + "expect": { + "vendor": "LG", + "model": "M255", + "type": "mobile" + } + }, { "desc": "LG K500", "ua": "Mozilla/5.0 (Linux; Android 6.0.1; LG-K500 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36", @@ -845,6 +1124,15 @@ "type": "smarttv" } }, + { + "desc": "Loewe Smart TV", + "ua": "Mozilla/5.0 (Linux; U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 OPR/46.0.2207.0 LOEWE-SL410/5.2.0.0 HbbTV/1.4.1 (; LOEWE; SL410; LOH/5.2.0.0;;) FVC/3.0 (LOEWE; SL410;) CE-HTML/1.0 Config (L:deu,CC:DEU) NETRANGEMMH", + "expect": { + "vendor": "LOEWE", + "model": "SL410", + "type": "smarttv" + } + }, { "desc": "Meizu M5 Note", "ua": "Mozilla/5.0 (Linux; Android 6.0; M5 Note Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043024 Safari/537.36 MicroMessenger/6.5.7.1040 NetType/WIFI Language/zh_CN", @@ -881,6 +1169,15 @@ "type": "mobile" } }, + { + "desc": "Motorola Moto Z3 Play", + "ua": "Mozilla/5.0 (Linux; Android 9; Moto Z3 Play) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Motorola", + "model": "Moto Z3 Play", + "type": "mobile" + } + }, { "desc": "Meizu M3S", "ua": "Mozilla/5.0 (X11; Linux; Android 5.1; MZ-M3s Build/LMY47I) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrom/45.0.2454.94 Mobile Safari/537.36", @@ -1034,6 +1331,15 @@ "type": "mobile" } }, + { + "desc": "Nokia 7", + "ua": "Mozilla/5.0 (Linux; Android 11; Nokia 7.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Nokia", + "model": "7.2", + "type": "mobile" + } + }, { "desc": "Nokia N9", "ua": "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13", @@ -1070,6 +1376,15 @@ "type": "wearable" } }, + { + "desc": "Oculus Quest Pro", + "ua": "Mozilla/5.0 (X11; Linux x86_64; Quest Pro) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/24.4.0.22.60.426469926 SamsungBrowser/4.0 Chrome/106.0.5249.181 VR Safari/537.36", + "expect": { + "vendor": "Facebook", + "model": "Quest Pro", + "type": "wearable" + } + }, { "desc": "OnePlus One", "ua": "Mozilla/5.0 (Linux; Android 4.4.4; A0001 Build/KTU84Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.59 Mobile Safari/537.36", @@ -1124,6 +1439,15 @@ "type": "mobile" } }, + { + "desc": "OnePlus 7T Pro", + "ua": "Mozilla/5.0 (Linux; Android 10; HD1913) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.5563.57 Mobile Safari/537.36 EdgA/110.0.1587.66", + "expect": { + "vendor": null, + "model": "HD1913", + "type": "mobile" + } + }, { "desc": "OnePlus 8T", "ua": "Mozilla/5.0 (Linux; Android 11; KB2005) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Mobile Safari/537.36", @@ -1142,6 +1466,15 @@ "type": "mobile" } }, + { + "desc": "OnePlus 10RT", + "ua": "Mozilla/5.0 (Linux; Android 13; CPH2413) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "OPPO", + "model": "CPH2413", + "type": "mobile" + } + }, { "desc": "OnePlus Nord N100", "ua": "Mozilla/5.0 (Linux; Android 10; BE2015 Build/QKQ1.200719.002; xx-xx) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36", @@ -1305,57 +1638,201 @@ } }, { - "desc": "Philips SmartTV", - "ua": "Opera/9.80 HbbTV/1.1.1 (; Philips; ; ; ; ) NETTV/4.0.2; en) Version/11.60", + "desc": "Realme 3 Pro", + "ua": "Mozilla/5.0 (Linux; Android 11; RMX1851) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", "expect": { - "vendor": "Philips", - "model": "", - "type": "smarttv" + "vendor": "Realme", + "model": "RMX1851", + "type": "mobile" } }, { - "desc": "Roku", - "ua": "Mozilla/5.0 (Roku) AppleWebKit/537.36 (KHTML, like Gecko) Web/1.1 Safari/537.36", + "desc": "Realme 8", + "ua": "Mozilla/5.0 (Linux; Android 12; RMX3085) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36", "expect": { - "vendor": "Roku", - "model": "", - "type": "smarttv" + "vendor": "Realme", + "model": "RMX3085", + "type": "mobile" } }, { - "desc": "Roku", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 Roku/DVP-8.10 (468.10E04145A)", + "desc": "Realme 9 Pro", + "ua": "Mozilla/5.0 (Linux; Android 13; RMX3471) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", "expect": { - "vendor": "Roku", - "model": "DVP-8.10", - "type": "smarttv" + "vendor": "Realme", + "model": "RMX3471", + "type": "mobile" } }, { - "desc": "Roku", - "ua": "Roku4640X/DVP-7.70 (297.70E04154A)", + "desc": "Realme GT Master", + "ua": "Mozilla/5.0 (Linux; Android 13; RMX3363) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36", "expect": { - "vendor": "Roku", - "model": "DVP-7.70", - "type": "smarttv" + "vendor": "Realme", + "model": "RMX3363", + "type": "mobile" } }, { - "desc": "Kindle Fire HD", - "ua": "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.4 Mobile Safari/535.19 Silk-Accelerated=true", + "desc": "Panasonic T31", + "ua": "Mozilla/5.0 (Linux; Android 4.2.2; Panasonic T31 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.170 Mobile Safari/537.36 ", "expect": { - "vendor": "Amazon", - "model": "KFTT", - "type": "tablet" + "vendor": "Panasonic", + "model": "T31", + "type": "mobile" } }, { - "desc": "Kindle Fire HD", - "ua": "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.4 Mobile Safari/535.19 Silk-Accelerated=true", + "desc": "Panasonic TX-32CSW514 SmartTV", + "ua": "HbbTV/1.2.1 (;Panasonic;VIERA 2015;3.014;a001-003 4000-0000;)", "expect": { - "vendor": "Amazon", - "model": "KFTT", - "type": "tablet" + "vendor": "Panasonic", + "model": "VIERA 2015", + "type": "smarttv" + } + }, + { + "desc": "Panasonic TX-40FXW724 SmartTV", + "ua": "HbbTV/1.4.1 (+DRM;Panasonic;SmartTV2018mid;3.024;4301-0003 0002-0000;SmartTV2018;)", + "expect": { + "vendor": "Panasonic", + "model": "SmartTV2018mid", + "type": "smarttv" + } + }, + { + "desc": "Panasonic TX-43HXW904 SmartTV", + "ua": "HbbTV/1.5.1 (+DRM;Panasonic;SmartTV2020mid;3.326;4301-0003 0008-0000;com.panasonic.SmartTV2020mid;)", + "expect": { + "vendor": "Panasonic", + "model": "SmartTV2020mid", + "type": "smarttv" + } + }, + { + "desc": "Panasonic DMR-HST130 SAT receiver", + "ua": "HbbTV/1.1.1 (+PVR;Panasonic;DIGA WebKit M8658;3.420;;)", + "expect": { + "vendor": "Panasonic", + "model": "DIGA WebKit M8658", + "type": "smarttv" + } + }, + { + "desc": "Philips SmartTV", + "ua": "Opera/9.80 HbbTV/1.1.1 (; Philips; ; ; ; ) NETTV/4.0.2; en) Version/11.60", + "expect": { + "vendor": "Philips", + "model": "", + "type": "smarttv" + } + }, + { + "desc": "Philips 32PFL6606K/02 SmartTV (2011)", + "ua": "Opera/9.80 (Linux mips ; U; HbbTV/1.1.1 (; Philips; ; ; ; ) CE-HTML/1.0 NETTV/3.1.0; en) Presto/2.6.33 Version/10.70", + "expect": { + "vendor": "Philips", + "model": "", + "type": "smarttv" + } + }, + { + "desc": "Philips 32PFL6606K/02 SmartTV (2013)", + "ua": "Opera/9.80 (Linux mips ; U; HbbTV/1.1.1 (; Philips; ; ; ; ) CE-HTML/1.0 NETTV/3.1.0; en) Presto/2.6.33 Version/10.70", + "expect": { + "vendor": "Philips", + "model": "", + "type": "smarttv" + } + }, + { + "desc": "Philips 32PHS5301/12 SmartTV (2016)", + "ua": "Mozilla/5.0 (Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36 OPR/29.0.1803.0 OMI/4.5.23.37.MOT2.13 HbbTV/1.2.1 (;Philips;32PHS5301/12;;_TV_MT5800;) Firmware/TPM161E_012.002.045.001 en", + "expect": { + "vendor": "Philips", + "model": "32PHS5301/12", + "type": "smarttv" + } + }, + { + "desc": "Roku", + "ua": "Mozilla/5.0 (Roku) AppleWebKit/537.36 (KHTML, like Gecko) Web/1.1 Safari/537.36", + "expect": { + "vendor": "Roku", + "model": "", + "type": "smarttv" + } + }, + { + "desc": "Roku", + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 Roku/DVP-8.10 (468.10E04145A)", + "expect": { + "vendor": "Roku", + "model": "DVP-8.10", + "type": "smarttv" + } + }, + { + "desc": "Roku", + "ua": "Roku4640X/DVP-7.70 (297.70E04154A)", + "expect": { + "vendor": "Roku", + "model": "DVP-7.70", + "type": "smarttv" + } + }, + { + "desc": "Xiaomi TV", + "ua": "Mozilla/5.0 (Linux; Android 10; MiTV-MOOQ0 Build/QTG3.200305.006; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/94.0.4606.61 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "MiTV-MOOQ0", + "type": "smarttv" + } + }, + { + "desc": "Kindle Fire HD", + "ua": "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.4 Mobile Safari/535.19 Silk-Accelerated=true", + "expect": { + "vendor": "Amazon", + "model": "KFTT", + "type": "tablet" + } + }, + { + "desc": "Kindle Fire HD", + "ua": "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.4 Mobile Safari/535.19 Silk-Accelerated=true", + "expect": { + "vendor": "Amazon", + "model": "KFTT", + "type": "tablet" + } + }, + { + "desc": "Echo Show 5", + "ua": "Mozilla/5.0 (Linux; Android 5.1; AEORK Build/LVY48F; xx-xx) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/70.0.3538.110 Mobile Safari/537.36", + "expect": { + "vendor": "Amazon", + "model": "AEORK", + "type": "tablet" + } + }, + { + "desc": "Echo Show 8", + "ua": "Mozilla/5.0 (Linux; Android 7.1; AEOCH) AppleWebKit/537.36 (KHTML, like Gecko) Silk/77.2.21 like Chrome/77.0.3865.92 Mobile Safari/537.36", + "expect": { + "vendor": "Amazon", + "model": "AEOCH", + "type": "tablet" + } + }, + { + "desc": "Echo Dot", + "ua": "Dalvik/2.1.0 (Linux; U; Android 5.1.1; AEOBC Build/LVY48F)", + "expect": { + "vendor": "Amazon", + "model": "AEOBC", + "type": "embedded" } }, { @@ -1385,6 +1862,24 @@ "type": "mobile" } }, + { + "desc": "Samsung Galaxy A50s", + "ua": "Mozilla/5.0 (Linux; Android 11; SM-A507FN) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Samsung", + "model": "SM-A507FN", + "type": "mobile" + } + }, + { + "desc": "Samsung Galaxy A52s", + "ua": "Mozilla/5.0 (Linux; Android 13; SM-A528B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Samsung", + "model": "SM-A528B", + "type": "mobile" + } + }, { "desc": "Samsung Galaxy A80", "ua": "Mozilla/5.0 (Linux; Android 9; SM-A805F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.112 Mobile Safari/537.36", @@ -1430,6 +1925,15 @@ "type": "mobile" } }, + { + "desc": "Samsung Galaxy S20 5G", + "ua": "Mozilla/5.0 (Linux; Android 10; SCG01) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Mobile Safari/537.36", + "expect": { + "vendor": "Samsung", + "model": "SCG01", + "type": "mobile" + } + }, { "desc": "Samsung Galaxy Note 10+", "ua": "Mozilla/5.0 (Linux; Android 9; SM-N976V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.89 Mobile Safari/537.36", @@ -1448,6 +1952,15 @@ "type": "mobile" } }, + { + "desc": "Samsung C8", + "ua": "Mozilla/5.0 (Linux; Android 7.1.1; SM-C7108) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Samsung", + "model": "SM-C7108", + "type": "mobile" + } + }, { "desc": "Samsung Galaxy Note 8", "ua": "Mozilla/5.0 (Linux; Android 4.2.2; GT-N5100 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.141 Safari/537.36", @@ -1502,6 +2015,15 @@ "type": "tablet" } }, + { + "desc": "Samsung Galaxy Tab S8", + "ua": "Mozilla/5.0 (Linux; Android 12; SM-X706B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Safari/537.36", + "expect": { + "vendor": "Samsung", + "model": "SM-X706B", + "type": "tablet" + } + }, { "desc": "Samsung Galaxy Tab S", "ua": "Mozilla/5.0 (Linux; Android 4.4.2; SM-T700 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.135 Safari/537.36", @@ -1574,6 +2096,24 @@ "type": "smarttv" } }, + { + "desc": "Samsung SmartTV HBBTV", + "ua": "HbbTV/1.5.1 (+DRM;Samsung;SmartTV2021:UAU7000;T-KSU2EDEUC-1506.0;KantSU2e;urn:samsungtv:familyname:21_KANTSU2E_UHD_BASIC:2021;) Tizen/6.0 (+TVPLUS+SmartHubLink) Chrome/76 LaTivu_1.0.1_2021 RVID/17", + "expect": { + "vendor": "Samsung", + "model": "SmartTV2021:UAU7000", + "type": "smarttv" + } + }, + { + "desc": "Sharp AQUOS-TVX19B", + "ua": "Mozilla/5.0 (Linux; Android 9; AQUOS-TVX19B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Sharp", + "model": "AQUOS-TVX19B", + "type": "smarttv" + } + }, { "desc": "Sharp Aquos B10", "ua": "Mozilla/5.0 (Linux; Android 7.0; SH-A01) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Mobile Safari/537.36", @@ -1592,6 +2132,15 @@ "type": "mobile" } }, + { + "desc": "Sharp Aquos L2", + "ua": "Mozilla/5.0 (Linux; Android 7.0; SH-L02) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Sharp", + "model": "SH-L02", + "type": "mobile" + } + }, { "desc": "Sharp Aquos R2", "ua": "Mozilla/5.0 (Linux; Android 8.0; SHV42) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.92 Mobile Safari/537.36", @@ -1601,6 +2150,24 @@ "type": "mobile" } }, + { + "desc": "SONY Xperia 1 III", + "ua": "Mozilla/5.0 (Linux; Android 11; A101SO) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Mobile Safari/537.36", + "expect": { + "vendor": "Sony", + "model": "A101SO", + "type": "mobile" + } + }, + { + "desc": "Sony G8141 (Xperia XZ1)", + "ua": "Mozilla/5.0 (Linux; Android 9; SO-01K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Sony", + "model": "SO-01K", + "type": "mobile" + } + }, { "desc": "Sony G8141 (Xperia XZ Premium)", "ua": "Mozilla/5.0 (Linux; Android 8.0.0; G8141) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Mobile Safari/537.36", @@ -1736,6 +2303,42 @@ "type": "tablet" } }, + { + "desc": "Sony BRAVIA 4K GB ATV3", + "ua": "Mozilla/5.0 (Linux; Andr0id 9; BRAVIA 4K GB ATV3 Build/PTT1.190515.001.S38) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36 OPR/46.0.2207.0 OMI/4.13.0.180.DIA5.104 Model/Sony-BRAVIA-4K-GB-ATV3", + "expect": { + "vendor": "Sony", + "model": "BRAVIA 4K GB ATV3", + "type": "smarttv" + } + }, + { + "desc": "Sony BRAVIA 4K GB ATV3", + "ua": "Mozilla/5.0 (Linux; Android 9; BRAVIA 4K GB ATV3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Sony", + "model": "BRAVIA 4K GB ATV3", + "type": "smarttv" + } + }, + { + "desc": "Sony Bravia 4k UR2", + "ua": "Mozilla/5.0 (Linux: Andr0id 9: BRAVIA 4K UR2 Build/PTT1.190515.001.S104) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36 OPR/46.0.2207.0 OMI/4.13.5.431.DIA5HBBTV.250 Model/Sony-BRAVIA-4K-UR2", + "expect": { + "vendor": "Sony", + "model": "BRAVIA 4K UR2", + "type": "smarttv" + } + }, + { + "desc": "Tecno KC8", + "ua": "Mozilla/5.0 (Linux; Android 10; TECNO KC8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "TECNO", + "model": "KC8", + "type": "mobile" + } + }, { "desc": "Tesla", "ua": "Mozilla/5.0 (X11; GNU/Linux) AppleWebKit/601.1 (KHTML, like Gecko) Tesla QtCarBrowser Safari/601.1", @@ -1754,6 +2357,150 @@ "type": "embedded" } }, + { + "desc": "TechniSAT Digit ISIO S SAT receiver", + "ua": "Opera/9.80 (Linux sh4; U; HbbTV/1.1.1 (;;;;;); CE-HTML; TechniSat Digit ISIO S; de) Presto/2.9.167 Version/11.50", + "expect": { + "vendor": "TechniSat", + "model": "Digit ISIO S", + "type": "smarttv" + } + }, + { + "desc": "TechniSAT MultyVision SmartTV", + "ua": "Opera/9.80 (Linux i686; U; HbbTV/1.1.1 (;;;;;); CE-HTML; TechniSat MultyVision ISIO; de) Presto/2.9.167 Version/11.50", + "expect": { + "vendor": "TechniSat", + "model": "MultyVision ISIO", + "type": "smarttv" + } + }, + { + "desc": "Ulefone Armor", + "ua": "Mozilla/5.0 (Linux; Android 6.0; Armor Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.107 Mobile Safari/537.36", + "expect": { + "vendor": "Ulefone", + "model": "Armor", + "type": "mobile" + } + }, + { + "desc": "Ulefone Armor", + "ua": "Mozilla/5.0 (Linux; arm_64; Android 6.0; Armor) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 YaBrowser/20.4.2.101.00 SA/1 Mobile Safari/537.36", + "expect": { + "vendor": "Ulefone", + "model": "Armor", + "type": "mobile" + } + }, + { + "desc": "Ulefone Armor 8 Pro", + "ua": "Mozilla/5.0 (Linux; Android 11; Armor 8 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.5481.192 Mobile Safari/537.36 OPR/74.1.3922.71199", + "expect": { + "vendor": "Ulefone", + "model": "Armor 8 Pro", + "type": "mobile" + } + }, + { + "desc": "Ulefone Armor 12 5G", + "ua": "Mozilla/5.0 (Linux; Android 11; Armor 12 5G Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/115.0.5790.166 Mobile Safari/537.36", + "expect": { + "vendor": "Ulefone", + "model": "Armor 12 5G", + "type": "mobile" + } + }, + { + "desc": "Ulefone Armor 20WT", + "ua": "Mozilla/5.0 (Linux; Android 12; Armor 20WT) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/22.0 Chrome/111.0.5563.116 Mobile Safari/537.36", + "expect": { + "vendor": "Ulefone", + "model": "Armor 20WT", + "type": "mobile" + } + }, + { + "desc": "Ulefone Armor Pad", + "ua": "Mozilla/5.0 (Linux; Android 12; Armor Pad Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/431.0.0.30.108;]", + "expect": { + "vendor": "Ulefone", + "model": "Armor Pad", + "type": "mobile" + } + }, + { + "desc": "Ulefone Armor X5 Pro", + "ua": "Mozilla/5.0 (Linux; Android 10; Armor X5 Pro Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/430.0.0.23.113;]", + "expect": { + "vendor": "Ulefone", + "model": "Armor X5 Pro", + "type": "mobile" + } + }, + { + "desc": "Ulefone Power Armor 14 Pro", + "ua": "Mozilla/5.0 (Linux; Android 12; Power Armor14 Pro Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/115.0.5790.138 Mobile Safari/537.36", + "expect": { + "vendor": "Ulefone", + "model": "Power Armor14 Pro", + "type": "mobile" + } + }, + { + "desc": "Ulefone Power Armor 18T", + "ua": "Mozilla/5.0 (Linux; Android 12; Power Armor 18T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Ulefone", + "model": "Power Armor 18T", + "type": "mobile" + } + }, + { + "desc": "Ulefone Power Armor 19T", + "ua": "Mozilla/5.0 (Linux; Android 12; Power Armor 19T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.5481.192 Mobile Safari/537.36 OPR/74.3.3922.71982", + "expect": { + "vendor": "Ulefone", + "model": "Power Armor 19T", + "type": "mobile" + } + }, + { + "desc": "Xiaomi 2201117TG", + "ua": "Mozilla/5.0 (Linux; Android 11; 2201117TG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.98 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "2201117TG", + "type": "mobile" + } + }, + { + "desc": "Xiaomi M2004J19C", + "ua": "Mozilla/5.0 (Linux; Android 11; M2004J19C Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.77 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "M2004J19C", + "type": "mobile" + } + }, + { + "desc": "Xiaomi M2006C3MNG", + "ua": "Mozilla/5.0 (Linux; Android 11; M2006C3MNG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "M2006C3MNG", + "type": "mobile" + } + }, + { + "desc": "Xiaomi 21061119DG", + "ua": "Mozilla/5.0 (Linux; arm_64; Android 11; 21061119DG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 YaBrowser/23.3.7.24.00 SA/3 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "21061119DG", + "type": "mobile" + } + }, { "desc": "Xiaomi 2013023", "ua": "Mozilla/5.0 (Linux; U; Android 4.2.2; en-US; 2013023 Build/HM2013023) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 UCBrowser/10.0.1.512 U3/0.8.0 Mobile Safari/533.1", @@ -1880,6 +2627,15 @@ "type": "mobile" } }, + { + "desc": "Xiaomi Mi CC9", + "ua": "Mozilla/5.0 (Linux; U; Android 11; zh-cn; MI CC 9 Build/RKQ1.200826.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.116 Mobile Safari/537.36 XiaoMi/MiuiBrowser/15.5.18", + "expect": { + "vendor": "Xiaomi", + "model": "MI CC 9", + "type": "mobile" + } + }, { "desc": "Xiaomi MI PAD 2", "ua": "Mozilla/5.0 (Linux; Android 5.1; MI PAD 2 Build/LMY47I; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.107 Safari/537.36 [FB_IAB/FB4A;FBAV/137.0.0.24.91;]", @@ -1907,6 +2663,51 @@ "type": "mobile" } }, + { + "desc": "Xiaomi POCO X3 Pro", + "ua": "Mozilla/5.0 (Linux; Android 11; M2102J20SI) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "M2102J20SI", + "type": "mobile" + } + }, + { + "desc": "Xiaomi POCO X3 Pro", + "ua": "Mozilla/5.0 (Linux; Android 12; M2102J20SG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "M2102J20SG", + "type": "mobile" + } + }, + { + "desc": "Xiaomi POCO X3 NFC", + "ua": "Mozilla/5.0 (Linux; Android 12; M2007J20CG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "M2007J20CG", + "type": "mobile" + } + }, + { + "desc": "Xiaomi POCO M2 Pro", + "ua": "Mozilla/5.0 (Linux; arm_64; Android 11; POCO M2 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 YaBrowser/22.11.7.42.00 SA/3 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "POCO M2 Pro", + "type": "mobile" + } + }, + { + "desc": "Xiaomi POCO M3", + "ua": "Mozilla/5.0 (Linux; Android 10; M2010J19CI) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "M2010J19CI", + "type": "mobile" + } + }, { "desc": "Xiaomi Redmi 4A", "ua": "Mozilla/5.0 (Linux; Android 6.0; Redmi 4A Build/MMB29M; xx-xx) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Mobile Safari/537.36", @@ -1916,6 +2717,15 @@ "type": "mobile" } }, + { + "desc": "Xiaomi Redmi 10C", + "ua": "Mozilla/5.0 (Linux; Android 12; 220333QAG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "220333QAG", + "type": "mobile" + } + }, { "desc": "Xiaomi Redmi K30 5G", "ua": "Mozilla/5.0 (Linux; Android 10; Redmi K30 5G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.96 Mobile Safari/537.36", @@ -1952,6 +2762,69 @@ "type": "mobile" } }, + { + "desc": "XiaoMi Redmi Note 9S", + "ua": "Mozilla/5.0 (Linux; Android 10; Redmi Note 9S) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "Redmi Note 9S", + "type": "mobile" + } + }, + { + "desc": "XiaoMi Redmi Note 10 5G", + "ua": "Mozilla/5.0 (Linux; Android 12; M2103K19C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.88 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "M2103K19C", + "type": "mobile" + } + }, + { + "desc": "XiaoMi Redmi Note 10 Pro", + "ua": "Mozilla/5.0 (Linux; Android 13; M2101K6P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "M2101K6P", + "type": "mobile" + } + }, + { + "desc": "XiaoMi Redmi Note 10 Pro", + "ua": "Mozilla/5.0 (Linux; Android 12; M2101K6G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "M2101K6G", + "type": "mobile" + } + }, + { + "desc": "XiaoMi Redmi Note 8", + "ua": "Mozilla/5.0 (Linux; Android 10; Redmi Note 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Xiaomi", + "model": "Redmi Note 8", + "type": "mobile" + } + }, + { + "desc": "XiaoMi Redmi Note 12 Turbo", + "ua": "Mozilla/5.0 (Linux; Android 13; 23049RAD8C; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.141 Mobile Safari/537.36 VivoBrowser/16.7.1.1", + "expect": { + "vendor": "Xiaomi", + "model": "23049RAD8C", + "type": "mobile" + } + }, + { + "desc": "ZTE Blade A6", + "ua": "Mozilla/5.0 (Linux; Android 7.1.1; ZTE BLADE A0620 Build/NMF26F; ru-ru) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.136 Mobile Safari/537.36 Puffin/9.2.0.50586AP", + "expect": { + "vendor": "ZTE", + "model": "BLADE A0620", + "type": "mobile" + } + }, { "desc": "PlayStation 4", "ua": "Mozilla/5.0 (PlayStation 4 3.00) AppleWebKit/537.73 (KHTML, like Gecko)", @@ -2051,6 +2924,15 @@ "type": "mobile" } }, + { + "desc": "Samsung Galaxy J7 Prime", + "ua": "Mozilla/5.0 (Linux; Android 8.1.0; SM-G610F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Samsung", + "model": "SM-G610F", + "type": "mobile" + } + }, { "desc": "Samsung Galaxy S6", "ua": "Mozilla/5.0 (Linux; Android 4.4.2; SM-G920I Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.135 Safari/537.36", @@ -2654,6 +3536,15 @@ "type": "smarttv" } }, + { + "desc": "Amazon Fire TV", + "ua": "Mozilla/5.0 (Linux; Android 9; AFTKA Build/PS7633.3445N; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/108.0.5359.160 Mobile Safari/537.36", + "expect": { + "vendor": "Amazon", + "model": "KA", + "type": "smarttv" + } + }, { "desc": "Android TV", "ua": "Mozilla/5.0 (Linux; Android 10; 2020/2021 UHD Android TV Build/QTG3.201102.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36", @@ -2721,8 +3612,17 @@ "desc": "FaceBook Mobile App", "ua": "[FBAN/FBIOS;FBAV/283.0.0.44.117;FBBV/238386386;FBDV/iPhone12,1;FBMD/iPhone;FBSN/iOS;FBSV/13.6.1;FBSS/2;FBID/phone;FBLC/en_US;FBOP/5;FBRV/240127608]", "expect": { - "vendor": null, - "model": null, + "vendor": "Apple", + "model": "iPhone12,1", + "type": "mobile" + } + }, + { + "desc": "Issue #519", + "ua": "ios/iPhone/14.2/SOME_CUSTOM_APP_VERSION", + "expect": { + "vendor": "Apple", + "model": "iPhone", "type": "mobile" } }, @@ -2825,6 +3725,15 @@ "type": "mobile" } }, + { + "desc": "Vivo Y93", + "ua": "Mozilla/5.0 (Linux; Android 8.1.0; vivo 1814) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Vivo", + "model": "1814", + "type": "mobile" + } + }, { "desc": "Vivo Y97", "ua": "Mozilla/5.0 (Linux; Android 8.1.0; V1813T Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36 VivoBrowser/9.0.14.0", @@ -2843,6 +3752,15 @@ "type": "mobile" } }, + { + "desc": "Vivo 1906 (Y11)", + "ua": "Mozilla/5.0 (Linux; Android 11; vivo 1906) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Vivo", + "model": "1906", + "type": "mobile" + } + }, { "desc": "Unknown Mobile using Firefox", "ua": "Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0", diff --git a/tests/engine-test.json b/tests/engine-test.json index 0590724..c825bd4 100644 --- a/tests/engine-test.json +++ b/tests/engine-test.json @@ -47,6 +47,14 @@ "version": "4.5.4" } }, + { + "desc": "LibWeb", + "ua": "Mozilla/4.0 (SerenityOS; x86) LibWeb+LibJS (Not KHTML, nor Gecko) LibWeb", + "expect": { + "name": "LibWeb", + "version": null + } + }, { "desc": "NetFront", "ua": "Mozilla/4.0 (PDA; Windows CE/1.0.1) NetFront/3.0", diff --git a/tests/os-test.json b/tests/os-test.json index aaf84b4..494426f 100644 --- a/tests/os-test.json +++ b/tests/os-test.json @@ -71,6 +71,22 @@ "version": "10" } }, + { + "desc": "WeChat Desktop for Windows Built-in Browser", + "ua": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 MicroMessenger/6.5.2.501 NetType/WIFI WindowsWechat QBCore/3.43.901.400 QQBrowser/9.0.2524.400", + "expect": { + "name": "Windows", + "version": "7" + } + }, + { + "desc": "WeChat Desktop for Windows Built-in Browser major version in 4", + "ua": "mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/81.0.4044.138 safari/537.36 nettype/wifi micromessenger/7.0.20.1781(0x6700143b) windowswechat", + "expect": { + "name": "Windows", + "version": "7" + } + }, { "desc": "Windows RT", "ua": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0)", @@ -175,6 +191,14 @@ "version": "2.3" } }, + { + "desc": "Tizen 6.0", + "ua": "HbbTV/1.5.1 (+DRM;Samsung;SmartTV2021:UAU7000;T-KSU2EDEUC-1506.0;KantSU2e;urn:samsungtv:familyname:21_KANTSU2E_UHD_BASIC:2021;) Tizen/6.0 (+TVPLUS+SmartHubLink) Chrome/76 LaTivu_1.0.1_2021 RVID/17", + "expect": { + "name": "Tizen", + "version": "6.0" + } + }, { "desc": "Android", "ua": "Mozilla/5.0 (Linux; U; Android 2.2.2; en-us; VM670 Build/FRG83G) AppleWebKit/533.1 (KHTML, like Gecko)", @@ -183,6 +207,14 @@ "version": "2.2.2" } }, + { + "desc": "HarmonyOS", + "ua": "Mozilla/5.0 (Linux; Android 10; HarmonyOS; YAL-AL10; HMSCore 6.3.0.327; GMSCore 21.48.15) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.105 HuaweiBrowser/12.0.3.310 Mobile Safari/537.36", + "expect": { + "name": "HarmonyOS", + "version": "10" + } + }, { "desc": "Sailfish", "ua": "Mozilla/5.0 (Linux; U; Sailfish 3.0; Mobile; rv:45.0) Gecko/45.0 Firefox/45.0 SailfishBrowser/1.0", @@ -575,6 +607,14 @@ "version": "1.9.2.22-0.1mdv2010.2" } }, + { + "desc": "Chrome OS", + "ua": "Mozilla/5.0 (X11; CrOS x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.0.0 Safari/537.36", + "expect": { + "name": "Chromium OS", + "version": null + } + }, { "desc": "Chromium OS", "ua": "Mozilla/5.0 (X11; CrOS x86_64 10575.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36", @@ -655,6 +695,46 @@ "version": null } }, + { + "desc": "iOS with FaceBook Mobile App", + "ua": "[FBAN/FBIOS;FBAV/283.0.0.44.117;FBBV/238386386;FBDV/iPhone12,1;FBMD/iPhone;FBSN/iOS;FBSV/13.6.1;FBSS/2;FBID/phone;FBLC/en_US;FBOP/5;FBRV/240127608]", + "expect": { + "name": "iOS", + "version": "13.6.1" + } + }, + { + "desc": "iOS with Slack App", + "ua": "com.tinyspeck.chatlyio/23.04.10 (iPhone; iOS 16.4.1; Scale/3.00)", + "expect": { + "name": "iOS", + "version": "16.4.1" + } + }, + { + "desc": "watchOS", + "ua": "server-bag [Watch OS,8.4,19S546,Watch3,4]", + "expect": { + "name": "watchOS", + "version": "8.4" + } + }, + { + "desc": "watchOS", + "ua": "atc/1.0 watchOS/7.4.1 model/Watch3,3 hwp/t8004 build/18T201 (6; dt:155)", + "expect": { + "name": "watchOS", + "version": "7.4.1" + } + }, + { + "desc": "watchOS", + "ua": "Watch4,3/5.3.8 (16U680)", + "expect": { + "name": "watchOS", + "version": "5.3.8" + } + }, { "desc": "Mac OS on PowerPC", "ua": "Mozilla/4.0 (compatible; MSIE 5.0b1; Mac_PowerPC)", @@ -919,6 +999,30 @@ "version": null } }, + { + "desc": "Panasonic Viera", + "ua": "HbbTV/1.2.1 (;Panasonic;VIERA 2015;3.014;a001-003 4000-0000;)", + "expect": { + "name": "VIERA", + "version": null + } + }, + { + "desc": "Netrange Smart TV", + "ua": "Mozilla/5.0 (Linux; U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 OPR/46.0.2207.0 LOEWE-SL410/5.2.0.0 HbbTV/1.4.1 (; LOEWE; SL410; LOH/5.2.0.0;;) FVC/3.0 (LOEWE; SL410;) CE-HTML/1.0 Config (L:deu,CC:DEU) NETRANGEMMH", + "expect": { + "name": "NETRANGE", + "version": null + } + }, + { + "desc": "NetTV 3.2.1", + "ua": "Opera/9.80 (Linux mips ; U; HbbTV/1.1.1 (; Philips; ; ; ; ) CE-HTML/1.0 NETTV/3.2.1; en) Presto/2.6.33 Version/10.70", + "expect": { + "name": "NETTV", + "version": "3.2.1" + } + }, { "desc": "HP-UX", "ua": "Mozilla/5.0 (X11; U; HP-UX 9000/785; es-ES; rv:1.0.1) Gecko/20020827 Netscape/7.0", @@ -990,5 +1094,13 @@ "name": "Linspire", "version": "1.5.0.4" } + }, + { + "desc": "SerenityOS", + "ua": "Mozilla/4.0 (SerenityOS; x86) LibWeb+LibJS (Not KHTML, nor Gecko) LibWeb", + "expect": { + "name": "SerenityOS", + "version": null + } } ] diff --git a/tests/test_uaparser.py b/tests/test_uaparser.py index 426c0f4..a995ab8 100644 --- a/tests/test_uaparser.py +++ b/tests/test_uaparser.py @@ -93,4 +93,4 @@ def test_ua_max_length(): actual = UAParser(ua) - assert len(actual.ua) == 255 + assert len(actual.ua) == 500 diff --git a/uaparser/__init__.py b/uaparser/__init__.py index baca838..9dcd6ef 100644 --- a/uaparser/__init__.py +++ b/uaparser/__init__.py @@ -2,7 +2,7 @@ UAParser ) -__version__ = '1.0.2' +__version__ = '1.0.37' __all__ = ( 'UAParser', diff --git a/uaparser/_uaparser.py b/uaparser/_uaparser.py index 23310a6..2f01966 100644 --- a/uaparser/_uaparser.py +++ b/uaparser/_uaparser.py @@ -15,7 +15,7 @@ SMARTTV = 'smarttv' WEARABLE = 'wearable' EMBEDDED = 'embedded' -UA_MAX_LENGTH = 255 +UA_MAX_LENGTH = 500 AMAZON = 'Amazon' APPLE = 'Apple' @@ -32,10 +32,13 @@ MOTOROLA = 'Motorola' OPERA = 'Opera' SAMSUNG = 'Samsung' +SHARP = 'Sharp' SONY = 'Sony' XIAOMI = 'Xiaomi' ZEBRA = 'Zebra' FACEBOOK = 'Facebook' +CHROMIUM_OS = 'Chromium OS' +MAC_OS = 'Mac OS' OLD_SAFARI_MAP = { '1.0': '/8', @@ -79,7 +82,7 @@ def majorize(version): def trim(string): - return re.sub(r'\s\s*$', EMPTY, re.sub(r'^\s\s*', EMPTY, string)) + return re.sub(r'^\s\s*', EMPTY, string) def str_mapper(string, mapping): @@ -112,30 +115,34 @@ def str_mapper(string, mapping): ], [VERSION, [NAME, OPERA]], [ # Mixed + r'\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)' # Baidu + ], [VERSION, [NAME, 'Baidu']], [ r'(kindle)\/([\w\.]+)', # Kindle r'(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)', # Lunascape/Maxthon/Netfront/Jasmine/Blazer # Trident based - r'(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)', # Avant/IEMobile/SlimBrowser - r'(ba?idubrowser)[\/ ]?([\w\.]+)', # Baidu Browser + r'(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)', # Avant/IEMobile/SlimBrowser r'(?:ms|\()(ie) ([\w\.]+)', # Internet Explorer # Webkit/KHTML based - r'(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)', # Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ + r'(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)', # Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ + r'(heytap|ovi)browser\/([\d\.]+)', # Heytap/Ovi r'(weibo)__([\d\.]+)' # Weibo ], [NAME, VERSION], [ r'(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)' # UCBrowser ], [VERSION, [NAME, 'UC' + BROWSER]], [ - r'\bqbcore\/([\w\.]+)' # WeChat Desktop for Windows Built-in Browser - ], [VERSION, [NAME, 'WeChat(Win) Desktop']], [ + r'microm.+\bqbcore\/([\w\.]+)', # WeChat Desktop for Windows Built-in Browser + r'\bqbcore\/([\w\.]+).+microm', r'micromessenger\/([\w\.]+)' # WeChat ], [VERSION, [NAME, 'WeChat']], [ r'konqueror\/([\w\.]+)' # Konqueror ], [VERSION, [NAME, 'Konqueror']], [ r'trident.+rv[: ]([\w\.]{1,9})\b.+like gecko' # IE11 ], [VERSION, [NAME, 'IE']], [ - r'yabrowser\/([\w\.]+)' # Yandex + r'ya(?:search)?browser\/([\w\.]+)' # Yandex ], [VERSION, [NAME, 'Yandex']], [ + r'slbrowser\/([\w\.]+)' # Smart Lenovo Browser + ], [VERSION, [NAME, 'Smart Lenovo ' + BROWSER]], [ r'(avast|avg)\/([\w\.]+)' # Avast/AVG Secure Browser ], [[NAME, r'(.+)', '$1 Secure ' + BROWSER], VERSION], [ r'\bfocus\/([\w\.]+)' # Firefox Focus @@ -154,27 +161,39 @@ def str_mapper(string, mapping): ], [VERSION, [NAME, FIREFOX]], [ r'\bqihu|(qi?ho?o?|360)browser' # 360 ], [[NAME, '360 ' + BROWSER]], [ - r'(oculus|samsung|sailfish)browser\/([\w\.]+)' # Oculus/Samsung/Sailfish Browser + r'(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)' # Oculus/Sailfish/HuaweiBrowser/VivoBrowser ], [[NAME, r'(.+)', '$1 ' + BROWSER], VERSION], [ + r'samsungbrowser\/([\w\.]+)' # Samsung Internet + ], [VERSION, [NAME, SAMSUNG + ' Internet']], [ r'(comodo_dragon)\/([\w\.]+)' # Comodo Dragon ], [[NAME, r'_', ' '], VERSION], [ + r'metasr[\/ ]?([\d\.]+)' # Sogou Explorer + ], [VERSION, [NAME, 'Sogou Explorer']], [ + r'(sogou)mo\w+\/([\d\.]+)' # Sogou Mobile + ], [[NAME, 'Sogou Mobile'], VERSION], [ r'(electron)\/([\w\.]+) safari', # Electron-based App r'(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))', # Tesla - r'm?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)' # QQBrowser/Baidu App/2345 Browser + r'm?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)' # QQBrowser/2345 Browser ], [NAME, VERSION], [ - r'(metasr)[\/ ]?([\w\.]+)', # SouGouBrowser - r'(lbbrowser)' # LieBao Browser + r'(lbbrowser)', # // LieBao Browser + r'\[(linkedin)app\]' # LinkedIn App for iOS & Android ], [NAME], [ # WebView r'((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)' # Facebook App for iOS & Android ], [[NAME, FACEBOOK], VERSION], [ + r'(Klarna)\/([\w\.]+)', # Klarna Shopping Browser for iOS & Android + r'(kakao(?:talk|story))[\/ ]([\w\.]+)', # Kakao App + r'(naver)\(.*?(\d+\.[\w\.]+).*\)', # Naver InApp r'safari (line)\/([\w\.]+)', # Line App for iOS r'\b(line)\/([\w\.]+)\/iab', # Line App for Android - r'(chromium|instagram)[\/ ]([-\w\.]+)' # Chromium/Instagram + r'(alipay)client\/([\w\.]+)', # Alipay + r'(chromium|instagram|snapchat)[\/ ]([-\w\.]+)' # Chromium/Instagram/Snapchat ], [NAME, VERSION], [ r'\bgsa\/([\w\.]+) .*safari\/' # Google Search Appliance on iOS ], [VERSION, [NAME, 'GSA']], [ + r'musical_ly(?:.+app_?version\/|_)([\w\.]+)' # TikTok + ], [VERSION, [NAME, 'TikTok']], [ r'headlesschrome(?:\/([\w\.]+)| )' # Chrome Headless ], [VERSION, [NAME, CHROME + ' Headless']], [ r' wv\).+(chrome)\/([\w\.]+)' # Chrome WebView @@ -183,9 +202,9 @@ def str_mapper(string, mapping): ], [VERSION, [NAME, 'Android ' + BROWSER]], [ r'(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)' # Chrome/OmniWeb/Arora/Tizen/Nokia ], [NAME, VERSION], [ - r'version\/([\w\.]+) .*mobile\/\w+ (safari)' # Mobile Safari + r'version\/([\w\.\,]+) .*mobile\/\w+ (safari)' # Mobile Safari ], [VERSION, [NAME, 'Mobile Safari']], [ - r'version\/([\w\.]+) .*(mobile ?safari|safari)' # Safari & Safari Mobile + r'version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)' # Safari & Safari Mobile ], [VERSION, NAME], [ r'webkit.+?(mobile ?safari|safari)(\/[\w\.]+)' # Safari < 3.0 ], [NAME, [VERSION, str_mapper, OLD_SAFARI_MAP]], [ @@ -206,8 +225,11 @@ def str_mapper(string, mapping): # Other r'(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)', # Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser - r'(links) \(([\w\.]+)' # Links - ], [NAME, VERSION]], + r'(links) \(([\w\.]+)', # Links + r'panasonic;(viera)' # Panasonic Viera + ], [NAME, VERSION], [ + r'(cobalt)\/([\w\.]+)' # Cobalt + ], [NAME, [VERSION, r'master.|lts.', '']]], 'cpu': [[ r'(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]' # AMD64 (x64) @@ -231,35 +253,43 @@ def str_mapper(string, mapping): 'device': [[ # Samsung - r'\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)' + r'\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)' ], [MODEL, [VENDOR, SAMSUNG], [TYPE, TABLET]], [ - r'\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)', + r'\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)', r'samsung[- ]([-\w]+)', r'sec-(sgh\w+)' ], [MODEL, [VENDOR, SAMSUNG], [TYPE, MOBILE]], [ # Apple - r'\((ip(?:hone|od)[\w ]*);' # iPod/iPhone + r'(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)' # iPod/iPhone ], [MODEL, [VENDOR, APPLE], [TYPE, MOBILE]], [ r'\((ipad);[-\w\),; ]+apple', # iPad r'applecoremedia\/[\w\.]+ \((ipad)', r'\b(ipad)\d\d?,\d\d?[;\]].+ios' ], [MODEL, [VENDOR, APPLE], [TYPE, TABLET]], [ + r'(macintosh);' + ], [MODEL, [VENDOR, APPLE]], [ + + # Sharp + r'\b(sh-?[altvz]?\d\d[a-ekm]?)' + ], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [ # Huawei r'\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)' ], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [ r'(?:huawei|honor)([-\w ]+)[;\)]', - r'\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)' + r'\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)' ], [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]], [ # Xiaomi - r'\b(poco[\w ]+)(?: bui|\))', # Xiaomi POCO + r'\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))', # Xiaomi POCO r'\b; (\w+) build\/hm\1', # Xiaomi Hongmi 'numeric' models r'\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui', # Xiaomi Hongmi r'\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))', # Xiaomi Redmi - r'\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))' # Xiaomi Mi + r'oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))', # Xiaomi Redmi 'numeric' models + r'\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))' # Xiaomi Mi ], [[MODEL, '_', ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [ + r'oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))', # Redmi Pad r'\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))' # Mi Pad tablets ], [[MODEL, '_', ' '], [VENDOR, XIAOMI], [TYPE, TABLET]], [ @@ -274,7 +304,7 @@ def str_mapper(string, mapping): ], [MODEL, [VENDOR, 'Vivo'], [TYPE, MOBILE]], [ # Realme - r'\b(rmx[12]\d{3})(?: bui|;|\))' + r'\b(rmx[1-3]\d{3})(?: bui|;|\))' ], [MODEL, [VENDOR, 'Realme'], [TYPE, MOBILE]], [ # Motorola @@ -310,7 +340,7 @@ def str_mapper(string, mapping): ], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [ # Sony - r'droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))' + r'droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))' ], [MODEL, [VENDOR, SONY], [TYPE, MOBILE]], [ r'sony tablet [ps]', r'\b(?:sony)?sgp\w+(?: bui|\))' @@ -323,7 +353,7 @@ def str_mapper(string, mapping): # Amazon r'(alexa)webm', - r'(kf[a-z]{2}wi)( bui|\))', # Kindle Fire without Silk + r'(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))', # Kindle Fire without Silk / Echo Show r'(kf[a-z]+)( bui|\)).+silk\/' # Kindle Fire HD ], [MODEL, [VENDOR, AMAZON], [TYPE, TABLET]], [ r'((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\/' # Fire Phone @@ -349,7 +379,7 @@ def str_mapper(string, mapping): # ZTE r'(zte)[- ]([\w ]+?)(?: bui|\/|\))', - r'(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)' # Alcatel/GeeksPhone/Nexian/Panasonic/Sony + r'(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)' # Alcatel/GeeksPhone/Nexian/Panasonic/Sony ], [VENDOR, [MODEL, '_', ' '], [TYPE, MOBILE]], [ # Acer @@ -361,12 +391,12 @@ def str_mapper(string, mapping): r'\bmz-([-\w]{2,})' ], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [ - # Sharp - r'\b(sh-?[altvz]?\d\d[a-ekm]?)' - ], [MODEL, [VENDOR, 'Sharp'], [TYPE, MOBILE]], [ + # Ulefone + r'; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))' + ], [MODEL, [VENDOR, 'Ulefone'], [TYPE, MOBILE]], [ # Mixed - r'(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)', # BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron + r'(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)', # BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron r'(hp) ([\w ]+\w)', # HP iPAQ r'(asus)-?(\w+)', # Asus r'(microsoft); (lumia[\w ]+)', # Microsoft Lumia @@ -374,6 +404,7 @@ def str_mapper(string, mapping): r'(jolla)', # Jolla r'(oppo) ?([\w ]+) bui' # OPPO ], [VENDOR, MODEL, [TYPE, MOBILE]], [ + r'(kobo)\s(ereader|touch)', # Kobo r'(archos) (gamepad2?)', # Archos r'(hp).+(touchpad(?!.+tablet)|tablet)', # HP TouchPad r'(kindle)\/([\w\.]+)', # Kindle @@ -443,17 +474,6 @@ def str_mapper(string, mapping): r'droid.+; (ec30|ps20|tc[2-8]\d[kx])\)' ], [MODEL, [VENDOR, ZEBRA], [TYPE, MOBILE]], [ - # Consoles - r'(ouya)', # Ouya - r'(nintendo) ([wids3utch]+)' # Nintendo - ], [VENDOR, MODEL, [TYPE, CONSOLE]], [ - r'droid.+; (shield) bui' # Nvidia - ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [ - r'(playstation [345portablevi]+)' # Playstation - ], [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]], [ - r'\b(xbox(?: one)?(?!; xbox))[\); ]' # Microsoft Xbox - ], [MODEL, [VENDOR, MICROSOFT], [TYPE, CONSOLE]], [ - # SmartTVs r'smart-tv.+(samsung)' # Samsung ], [VENDOR, [TYPE, SMARTTV]], [ @@ -465,38 +485,60 @@ def str_mapper(string, mapping): ], [VENDOR, [MODEL, APPLE + ' TV'], [TYPE, SMARTTV]], [ r'crkey' # Google Chromecast ], [[MODEL, CHROME + 'cast'], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [ - r'droid.+aft(\w)( bui|\))' # Fire TV + r'droid.+aft(\w+)( bui|\))' # Fire TV ], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [ - r'\(dtv[\);].+(aquos)' # Sharp - ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [ + r'\(dtv[\);].+(aquos)', # Sharp + r'(aquos-tv[\w ]+)\)' + ], [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],[ + r'(bravia[\w ]+)( bui|\))' # Sony + ], [MODEL, [VENDOR, SONY], [TYPE, SMARTTV]], [ + r'(mitv-\w{5}) bui' # Xiaomi + ], [MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]], [ + r'Hbbtv.*(technisat) (.*);' # TechniSAT + ], [VENDOR, MODEL, [TYPE, SMARTTV]], [ r'\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)', # Roku - r'hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)' # HbbTV devices + r'hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)' # HbbTV devices ], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [ r'\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b' # SmartTV from Unidentified Vendors ], [[TYPE, SMARTTV]], [ + # Consoles + r'(ouya)', # Ouya + r'(nintendo) ([wids3utch]+)' # Nintendo + ], [VENDOR, MODEL, [TYPE, CONSOLE]], [ + r'droid.+; (shield) bui' # Nvidia + ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [ + r'(playstation [345portablevi]+)' # Playstation + ], [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]], [ + r'\b(xbox(?: one)?(?!; xbox))[\); ]' # Microsoft Xbox + ], [MODEL, [VENDOR, MICROSOFT], [TYPE, CONSOLE]], [ + # Wearables r'((pebble))app' # Pebble ], [VENDOR, MODEL, [TYPE, WEARABLE]], [ + r'(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+' # Apple Watch + ], [MODEL, [VENDOR, APPLE], [TYPE, WEARABLE]], [ r'droid.+; (glass) \d' # Google Glass ], [MODEL, [VENDOR, GOOGLE], [TYPE, WEARABLE]], [ r'droid.+; (wt63?0{2,3})\)' ], [MODEL, [VENDOR, ZEBRA], [TYPE, WEARABLE]], [ - r'(quest( 2)?)' # Oculus Quest + r'(quest( 2| pro)?)' # Oculus Quest ], [MODEL, [VENDOR, FACEBOOK], [TYPE, WEARABLE]], [ # Embedded r'(tesla)(?: qtcarbrowser|\/[-\w\.]+)' # Tesla ], [VENDOR, [TYPE, EMBEDDED]], [ + r'(aeobc)\b' # Echo Dot + ], [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]], [ # Mixed (Generic) - r'droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari' # Android Phones from Unidentified Vendors + r'droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari' # Android Phones from Unidentified Vendors ], [MODEL, [TYPE, MOBILE]], [ r'droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari' # Android Tablets from Unidentified Vendors ], [MODEL, [TYPE, TABLET]], [ r'\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))' # Unidentifiable Tablet ], [[TYPE, TABLET]], [ - r'(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))' # Unidentifiable Mobile + r'(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))' # Unidentifiable Mobile ], [[TYPE, MOBILE]], [ r'(android[-\w\. ]{0,9});.+buil' # Generic Android Device ], [MODEL, [VENDOR, 'Generic']]], @@ -510,7 +552,8 @@ def str_mapper(string, mapping): r'(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)', # WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna r'ekioh(flow)\/([\w\.]+)', # Flow r'(khtml|tasman|links)[\/ ]\(?([\w\.]+)', # KHTML/Tasman/Links - r'(icab)[\/ ]([23]\.[\d\.]+)' # iCab + r'(icab)[\/ ]([23]\.[\d\.]+)', # iCab + r'\b(libweb)' ], [NAME, VERSION], [ r'rv\:([\w\.]{1,9})\b.+(gecko)' # Gecko ], [VERSION, NAME]], @@ -519,23 +562,24 @@ def str_mapper(string, mapping): # Windows r'microsoft (windows) (vista|xp)' # Windows (iTunes) ], [NAME, VERSION], [ - r'(windows) nt 6\.2; (arm)', # Windows RT r'(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)', # Windows Phone - r'(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)' ], [NAME, [VERSION, str_mapper, WINDOWS_VERSION_MAP]], [ - r'(win(?=3|9|n)|win 9x )([nt\d\.]+)' - ], [[NAME, 'Windows'], [VERSION, str_mapper, WINDOWS_VERSION_MAP]], [ + r'windows nt 6\.2; (arm)', # Windows RT + r'windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)', + r'(?:win(?=3|9|n)|win 9x )([nt\d\.]+)' + ], [[VERSION, str_mapper, WINDOWS_VERSION_MAP], [NAME, 'Windows']], [ # iOS/macOS r'ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)', # iOS + r'(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)', r'cfnetwork\/.+darwin' ], [[VERSION, '_', '.'], [NAME, 'iOS']], [ r'(mac os x) ?([\w\. ]*)', r'(macintosh|mac_powerpc\b)(?!.+haiku)' # Mac OS - ], [[NAME, 'Mac OS'], [VERSION, '_', '.']], [ + ], [[NAME, MAC_OS], [VERSION, '_', '.']], [ # Mobile OSes - r'droid ([\w\.]+)\b.+(android[- ]x86)' # Android-x86 + r'droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)' # Android-x86/HarmonyOS ], [VERSION, NAME], [ r'(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)', # Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS r'(blackberry)\w*\/([\w\.]*)', # Blackberry @@ -551,12 +595,19 @@ def str_mapper(string, mapping): r'web0s;.+rt(tv)', r'\b(?:hp)?wos(?:browser)?\/([\w\.]+)' # WebOS ], [VERSION, [NAME, 'webOS']], [ + r'watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)' # watchOS + ], [VERSION, [NAME, 'watchOS']], [ # Google Chromecast r'crkey\/([\d\.]+)' # Google Chromecast ], [VERSION, [NAME, CHROME + 'cast']], [ - r'(cros) [\w]+ ([\w\.]+\w)' # Chromium OS - ], [[NAME, 'Chromium OS'], VERSION], [ + r'(cros) [\w]+(?:\)| ([\w\.]+)\b)' # Chromium OS + ], [[NAME, CHROMIUM_OS], VERSION],[ + + # Smart TVs + r'panasonic;(viera)', # Panasonic Viera + r'(netrange)mmh', # Netrange + r'(nettv)\/(\d+\.[\w\.]+)', # NetTV # Console r'(nintendo|playstation) ([wids345portablevuch]+)', # Nintendo/Playstation @@ -576,7 +627,7 @@ def str_mapper(string, mapping): ], [[NAME, 'Solaris'], VERSION], [ r'((?:open)?solaris)[-\/ ]?([\w\.]*)', # Solaris r'(aix) ((\d)(?=\.|\)| )[\w\.])*', # AIX - r'\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)', # BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX + r'\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)', # BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS r'(unix) ?([\w\.]*)' # UNIX ], [NAME, VERSION]] } @@ -601,6 +652,8 @@ def rgx_mapper(ua, arrays): # try matching uastring with regexes while j < len(regex) and not matches: + if not regex[j]: + break matches = regex[j].search(ua) j += 1 if matches: