Skip to content

Commit

Permalink
Merge branch 'master' into pr_device_440
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuconcioiu authored Jun 17, 2024
2 parents d80ad48 + d9c2c4f commit 38f7126
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 18 deletions.
3 changes: 2 additions & 1 deletion Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ class Browser extends AbstractClientParser
'K4' => 'Kitt',
'KW' => 'Kiwi',
'KD' => 'Kode Browser',
'KU' => 'KUN',
'KT' => 'KUTO Mini Browser',
'KY' => 'Kylo',
'KZ' => 'Kazehakase',
Expand Down Expand Up @@ -763,7 +764,7 @@ class Browser extends AbstractClientParser
'H5', 'V3', 'G2', 'BG', 'OL', 'II', 'TL', 'M6', 'Y3',
'M7', 'GN', 'D3', 'IG', 'HW', '4O', 'OU', '5P', 'KE',
'5A', 'TT', '6P', 'G3', '7P', 'VU', 'F8', 'L4', 'DK',
'DP', 'KL', 'K4', 'N6',
'DP', 'KL', 'K4', 'N6', 'KU',
];

/**
Expand Down
6 changes: 3 additions & 3 deletions README.md

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9424,3 +9424,39 @@
engine: Gecko
engine_version: 1.9.1
family: Firefox
-
user_agent: Mozilla/4.0 (compatible; KUN/3.0.1; SPH-W9000; CellPhone; Profile/1.0)
client:
type: browser
name: KUN
version: 3.0.1
engine: ""
engine_version: ""
family: ""
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 12_5_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) PHX/13.3
client:
type: browser
name: Phoenix Browser
version: "13.3"
engine: WebKit
engine_version: 605.1.15
family: Chrome
-
user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 DuckDuckGo/7 Safari/605.1.15
client:
type: browser
name: DuckDuckGo Privacy Browser
version: "7"
engine: WebKit
engine_version: 605.1.15
family: Chrome
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 YaBrowser/24.4.5.383.10 SA/3 Mobile/15E148 Safari/604.1
client:
type: browser
name: Yandex Browser
version: 24.4.5.383.10
engine: WebKit
engine_version: 605.1.15
family: ""
8 changes: 8 additions & 0 deletions Tests/Parser/fixtures/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4958,3 +4958,11 @@
version: "3.0"
platform: x86
family: GNU/Linux
-
user_agent: NetworkingExtension/8619.1.10.2 CFNetwork/1555.1 Darwin/24.0.0
os:
name: iOS
short_name: IOS
version: "18.0"
platform: ""
family: iOS
18 changes: 18 additions & 0 deletions Tests/fixtures/smart_speaker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,21 @@
model: SmartSpeak Duo Max
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.225 Safari/537.36 CrKey/1.56.500000 DeviceType/SmartSpeaker
os:
name: GNU/Linux
version: ""
platform: "ARM"
client:
type: browser
name: Chrome
version: 90.0.4430.225
engine: Blink
engine_version: 90.0.4430.225
device:
type: smart speaker
brand: Google
model: Chromecast
os_family: GNU/Linux
browser_family: Chrome
15 changes: 11 additions & 4 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
###############

# KUN (https://api.dcmys.kr/etc/historical/kun_3.0.1_cp_개발자_가이드_v1.1.pdf)
- regex: 'KUN/(\d+[\.\d]+)'
name: 'KUN'
version: '$1'

# Naenara Browser (https://en.wikipedia.org/wiki/Naenara_(browser))
- regex: 'NaenaraBrowser(?:/(\d+[\.\d]+))?'
name: 'Naenara Browser'
Expand Down Expand Up @@ -1073,8 +1078,6 @@
- regex: 'PHX/(?:(\d+[\.\d]+))?'
name: 'Phoenix Browser'
version: '$1'
engine:
default: 'Blink'

# PrivacyWall (https://play.google.com/store/apps/details?id=org.privacywall.browser)
- regex: 'PrivacyWall/(?:(\d+[\.\d]+))?'
Expand Down Expand Up @@ -2200,7 +2203,7 @@
version: '$1'
engine:
default: 'WebKit'
- regex: 'iP(?:hone|ad);.+YaBrowser(?:/(\d+[\.\d]*)) Mobile'
- regex: 'iP(?:hone|ad).*YaBrowser(?:/(\d+[\.\d]*))'
name: 'Yandex Browser'
version: '$1'
engine:
Expand Down Expand Up @@ -2374,7 +2377,11 @@
versions:
28: 'Blink'

- regex: '(?:DDG-Android-|DuckDuckGo/|ddg_android/)(\d+[\.\d]*)'
# DuckDuckGo Privacy Browser
- regex: 'DuckDuckGo/(\d+[\.\d]*)'
name: 'DuckDuckGo Privacy Browser'
version: '$1'
- regex: '(?:DDG-Android-|ddg_android/)(\d+[\.\d]*)'
name: 'DuckDuckGo Privacy Browser'
version: '$1'
engine:
Expand Down
3 changes: 3 additions & 0 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9477,6 +9477,9 @@ Google:
- regex: '(GFHD[12]00)'
device: 'tv'
model: 'Fiber $1'
- regex: 'CrKey/[0-9.]+ DeviceType/SmartSpeaker'
model: 'Chromecast'
device: 'smart speaker'
- regex: 'CrKey[^a-z0-9]'
model: 'Chromecast'
device: 'tv'
Expand Down
26 changes: 16 additions & 10 deletions regexes/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,8 @@
- regex: '(?:Android API \d+|\d+/tclwebkit(?:\d+[\.\d]*)|(?:(?<!\d )Android/\d{2}|(?<!; |\d{4}/)Android (?!1[0-5])\d{2})(?![^ ]))'
name: 'Android'
versions:
- regex: '(?:Android API 35|35/tclwebkit|Android[ /]35)'
version: '15'
- regex: '(?:Android API 34|34/tclwebkit|Android[ /]34)'
version: '14'
- regex: '(?:Android API 33|33/tclwebkit|Android[ /]33)'
Expand Down Expand Up @@ -1063,19 +1065,19 @@
##########
# tvOS (https://developer.apple.com/tvos/)
##########
- regex: 'Apple ?TV.*CPU (?:iPhone )?OS ((?:9|1[0-7])[_\.]\d+(?:[_.]\d+)*)'
- regex: 'Apple ?TV.*CPU (?:iPhone )?OS ((?:9|1[0-8])[_\.]\d+(?:[_.]\d+)*)'
name: 'tvOS'
version: '$1'

- regex: 'Apple TV; iOS ((?:9|1[0-7])[_\.]\d+(?:[_.]\d+)*)'
- regex: 'Apple TV; iOS ((?:9|1[0-8])[_\.]\d+(?:[_.]\d+)*)'
name: 'tvOS'
version: '$1'

- regex: 'iOS(?:; |/)((?:9|1[0-7])\.\d+(?:[_\.]\d+)*) (?:model/)?AppleTV'
- regex: 'iOS(?:; |/)((?:9|1[0-8])\.\d+(?:[_\.]\d+)*) (?:model/)?AppleTV'
name: 'tvOS'
version: '$1'

- regex: 'tvOS[ /]?((?:9|1[0-7])\.\d+(?:[_\.]\d+)*);?'
- regex: 'tvOS[ /]?((?:9|1[0-8])\.\d+(?:[_\.]\d+)*);?'
name: 'tvOS'
version: '$1'

Expand All @@ -1096,27 +1098,27 @@
##########
# iPadOS (https://www.apple.com/ipados/)
##########
- regex: 'FBMD/iPad;.*FBSV/ ?(1[3-7]).(\d+[\.\d]*);'
- regex: 'FBMD/iPad;.*FBSV/ ?(1[3-8]).(\d+[\.\d]*);'
name: 'iPadOS'
version: '$1.$2'

- regex: 'iPad(?:OS)?[ /](1[3-7])\.(\d+[\.\d]*)'
- regex: 'iPad(?:OS)?[ /](1[3-8])\.(\d+[\.\d]*)'
name: 'iPadOS'
version: '$1.$2'

- regex: '^iPad(?:\d+[\,\d]*)/(1[3-7])\.(\d+[\.\d]*)'
- regex: '^iPad(?:\d+[\,\d]*)/(1[3-8])\.(\d+[\.\d]*)'
name: 'iPadOS'
version: '$1.$2'

- regex: 'iPad(?:; (?:iOS|iPadOS|iPhone OS)|.+CPU (?:iPad |iPhone )?OS) ((1[3-7])+(?:[_\.]\d+)*)'
- regex: 'iPad(?:; (?:iOS|iPadOS|iPhone OS)|.+CPU (?:iPad |iPhone )?OS) ((1[3-8])+(?:[_\.]\d+)*)'
name: 'iPadOS'
version: '$1'

- regex: 'iOS/(1[3-7])\.(\d+[\.\d]*).+Apple/iPad'
- regex: 'iOS/(1[3-8])\.(\d+[\.\d]*).+Apple/iPad'
name: 'iPadOS'
version: '$1.$2'

- regex: 'iPhone OS,(1[3-7])\.(\d+[\.\d]*).+iPad'
- regex: 'iPhone OS,(1[3-8])\.(\d+[\.\d]*).+iPad'
name: 'iPadOS'
version: '$1.$2'

Expand Down Expand Up @@ -1158,6 +1160,8 @@
- regex: '^(?!com\.apple\.Safari\.SearchHelper|Safari).*(?:CFNetwork|Mana)/.+ Darwin/(\d+[\.\d]+)(?!.*(?:x86_64|i386|PowerMac|Power%20Macintosh))'
name: 'iOS'
versions:
- regex: 'Darwin/24\.0\.0'
version: '18.0'
- regex: 'Darwin/23\.5\.0'
version: '17.5'
- regex: 'Darwin/23\.4\.0'
Expand Down Expand Up @@ -1383,6 +1387,8 @@
- regex: '(?:CFNetwork|Mana|StudioDisplay)/.+Darwin(?:/|; )(?:[\d\.]+).+(?:x86_64|i386|Power%20Macintosh)|(?:x86_64-apple-)?darwin(?:[\d\.]+)|C?Python.*Darwin|PowerMac|com\.apple\.Safari\.SearchHelper|^Safari'
name: 'Mac'
versions:
- regex: '(?:x86_64-apple-)?Darwin(?:/|; )?24\.0\.0'
version: '15.0'
- regex: '(?:x86_64-apple-)?Darwin(?:/|; )?23\.5\.0'
version: '14.5'
- regex: '(?:x86_64-apple-)?Darwin(?:/|; )?23\.4\.0'
Expand Down

0 comments on commit 38f7126

Please # to comment.