Skip to content

Commit b0956be

Browse files
committed
Add support for Kwai (social network)
1 parent 6a0ecc9 commit b0956be

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

regexes.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,11 @@ user_agent_parsers:
511511
# HiBrowser
512512
- regex: '(HiBrowser)\/v(\d+)\.(\d+)\.(\d+)\.(\d+)'
513513

514+
# Kwai
515+
# must before Chrome Mobile WebView
516+
- regex: '(Kwai|ksNebula|Merchantshop)\/(\d+)\.(\d+)\.(\d+)\.(\d+)'
517+
family_replacement: 'Kwai'
518+
514519
# Chrome Mobile
515520
- regex: 'Version/.{1,300}(Chrome)/(\d+)\.(\d+)\.(\d+)\.(\d+)'
516521
family_replacement: 'Chrome Mobile WebView'

tests/test_ua.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,34 @@ test_cases:
337337
minor: '10'
338338
patch: '1'
339339

340+
- user_agent_string: 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Kwai/13.3.30.9227 ISLP/0 StatusHT/62 KDT/PHONE iosSCH/0 TitleHT/44 NetType/WIFI ISDM/0 ICFO/0 locale/zh-Hans CT/0 Yoda/3.1.3 ISLB/0 CoIS/0 ISLM/0 WebViewType/WK BHT/102 AZPREFIX/az4'
341+
family: 'Kwai'
342+
major: '13'
343+
minor: '3'
344+
patch: '30'
345+
patch_minor: '9227'
346+
347+
- user_agent_string: 'Mozilla/5.0 (Linux; Android 12; BRT-W09 Build/HONORBRT-W09; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.105 Safari/537.36 Yoda/3.2.13-rc4 Kwai/13.3.30.41464 OS_PRO_BIT/64 MAX_PHY_MEM/7851 KDT/PAD AZPREFIX/az2 ICFO/0 StatusHT/24 TitleHT/44 NetType/WIFI ISLP/0 ISDM/0 ISLB/0 locale/zh-cn SHP/2560 SWP/1600 SD/2.5 CT/0 ISLM/0'
348+
family: 'Kwai'
349+
major: '13'
350+
minor: '3'
351+
patch: '30'
352+
patch_minor: '41464'
353+
354+
- user_agent_string: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 ksNebula/13.2.30.3824 ISLP/0 StatusHT/48 KDT/PHONE iosSCH/0 TitleHT/44 NetType/WIFI ISDM/0 ICFO/0 locale/zh-Hans CT/0 Yoda/3.1.1 ISLB/0 CoIS/0 ISLM/0 WebViewType/WK BHT/68 AZPREFIX/az4'
355+
family: 'Kwai'
356+
major: '13'
357+
minor: '2'
358+
patch: '30'
359+
patch_minor: '3824'
360+
361+
- user_agent_string: 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Merchantshop/6.3.30.1218 PGID/0447B97E-93D4-4489-B529-881C01F0C0F5 Yoda/2.10.4.5.stable6 StatusHT/54 NetType/WIFI TitleHT/44 WebViewType/WK'
362+
family: 'Kwai'
363+
major: '6'
364+
minor: '3'
365+
patch: '30'
366+
patch_minor: '1218'
367+
340368
- user_agent_string: 'Mozilla/5.0 (Linux; Android 9; Pixel 2 XL Build/PPP5.180610.010; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.85 Mobile Safari/537.36'
341369
family: 'Chrome Mobile WebView'
342370
major: '68'

0 commit comments

Comments
 (0)