Skip to content

Commit

Permalink
Merge branch 'master' into pr_device_469
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuconcioiu authored Nov 18, 2024
2 parents 51267da + 7b1378a commit 55eac16
Show file tree
Hide file tree
Showing 11 changed files with 186 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ public function parse(): ?array
}
}

if (empty($name)) {
if (empty($name) || 1 === \preg_match('/Cypress|PhantomJS/', $this->userAgent)) {
return [];
}

Expand Down
8 changes: 4 additions & 4 deletions README.md

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions Tests/Parser/Client/fixtures/library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -695,3 +695,27 @@
type: library
name: quic-go
version: ""
-
user_agent: Jaunt/1.5
client:
type: library
name: Jaunt
version: "1.5"
-
user_agent: Android.LVLDM
client:
type: library
name: Android License Verification Library
version: ""
-
user_agent: Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Cypress/12.1.0 Chrome/106.0.5249.51 Electron/21.0.0 Safari/537.36
client:
type: library
name: Cypress
version: 12.1.0
-
user_agent: Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1
client:
type: library
name: PhantomJS
version: 2.1.1
84 changes: 84 additions & 0 deletions Tests/Parser/Client/fixtures/mobile_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2219,3 +2219,87 @@
type: mobile app
name: TopSecret Chat
version: 1.2.0
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 aweme_31.9.0 Region/CN AppTheme/light NetType/WIFI JsSdk/2.0 Channel/App ByteLocale/zh ByteFullLocale/zh-Hans-CN WKWebView/1 Bullet/1 aweme/31.9.0 BulletTag/C4F7B8CE-DCC0-492D-934F-923A3909D158 BytedanceWebview/d8a21c6 FalconTag/D8105CFD-2385-4C85-AB6C-7A3DF31B9ACE
client:
type: mobile app
name: Douyin
version: 31.9.0
-
user_agent: Mozilla/5.0 (Linux; Android 10; HD1900 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/75.0.3770.156 Mobile Safari/537.36 aweme_230400 JsSdk/1.0 NetType/WIFI AppName/aweme app_version/23.4.0 ByteLocale/zh-CN Region/CN AppSkin/white AppTheme/light BytedanceWebview/d8a21c6 WebView/075113004008
client:
type: mobile app
name: Douyin
version: 23.4.0
-
user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Twist Tab Build/OC; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/70.0.3538.110 Safari/537.36trill_400 JsSdk/1.0 NetType/WIFI Channel/googleplay AppName/musically_go app_version/4.0.0 ByteLocale/pt-BR Region/BR
client:
type: mobile app
name: TikTok Lite
version: 4.0.0
-
user_agent: Mozilla/5.0 (Linux; Android 11; SM-A107M Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36 Yoda/oversea-3.1.1-rc6-cache ISDR/0 Kwai_Pro/10.9.10.537204 NetScore/53 NST/F deviceScore/16 webviewPreloaded/false WebViewPreAlloc/1 StatusHT/32 TitleHT/50 NetType/WIFI ISLP/1 ISDM/0 ISLB/0 locale/pt-br evaSupported/false kwaiPixelAd
client:
type: mobile app
name: Kwai Pro
version: 10.9.10.537204
-
user_agent: Mozilla/5.0 (iPad; CPU OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Kwai/12.9.10.8962 ISLP/0 StatusHT/24 KDT/PAD ISDM/1 TitleHT/44 NetType/WIFI ICFO/0 locale/zh-Hans CT/0 Yoda/3.0.3.1 ISLB/0 CoIS/0 ISLM/0 WebViewType/WK BHT/50 AZPREFIX/az2
client:
type: mobile app
name: Kwai
version: 12.9.10.8962
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Sooplive Webview/8.0.4 device_id=f55b74fd2f6a7dfa83e52512038c7053; adid=ADID_DISABLED;
client:
type: mobile app
name: SOOP
version: 8.0.4
-
user_agent: GoEuroAndroid/9.39.3 (Realme RMX3366; Android 14; okhttp/4.9.3) WebView
client:
type: mobile app
name: GoEuro
version: 9.39.3
-
user_agent: GoEuroIOS /9.41.0 (iPhone; iOS 17.5.1; Scale/2.00) WebView
client:
type: mobile app
name: GoEuro
version: 9.41.0
-
user_agent: 'Mozilla/5.0 (Linux; Android 8.1.0; CPH1901 Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.120 Mobile Safari/537.36 trill_200005 JsSdk/1.0 NetType/WIFI Channel/googleplay AppName/trill app_version/20.0.5 ByteLocale/id-ID ByteFullLocale/id-ID Region/ID BytedanceWebview/d8a21c6'
client:
type: mobile app
name: TikTok
version: 20.0.5
-
user_agent: Mozilla/5.0 (Linux; Android 8.1.0; CPH1909 Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/70.0.3538.110 Mobile Safari/537.36 Channel/release AppName/ultralite app_version/26.4.4 Region/EG ByteLocale/ar ByteFullLocale/ar
client:
type: mobile app
name: TikTok Lite
version: 26.4.4
-
user_agent: iOS 16.3.1, iPhone, BOOM v12.6.98, webview
client:
type: mobile app
name: Boom360
version: 12.6.98
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 WebViewApp WallaNews/9.8.2/IOS
client:
type: mobile app
name: Walla News
version: 9.8.2
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_7_10 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 WebViewApp TRP_iPhone_App/8.0.3
client:
type: mobile app
name: TRP Retail Locator
version: 8.0.3
-
user_agent: Mozilla/5.0 (iPad; CPU OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 WebViewApp Townnews-Now/4.0
client:
type: mobile app
name: TownNews Now
version: "4.0"
9 changes: 0 additions & 9 deletions Tests/fixtures/bots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7050,15 +7050,6 @@
producer:
name: Ghost Inspector, Inc.
url: https://www.ghostinspector.com/
-
user_agent: Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Cypress/12.1.0 Chrome/106.0.5249.51 Electron/21.0.0 Safari/537.36
bot:
name: Cypress
category: Site Monitor
url: https://github.com/cypress-io/cypress
producer:
name: Cypress.io, Inc.
url: https://www.cypress.io/
-
user_agent: Google-Area120-PrivacyPolicyFetcher
bot:
Expand Down
18 changes: 0 additions & 18 deletions Tests/fixtures/podcasting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -494,24 +494,6 @@
model: ""
os_family: Unknown
browser_family: Unknown
-
user_agent: Android.LVLDM
os:
name: Android
version: ""
platform: ""
client:
type: browser
name: Android Browser
version: ""
engine: WebKit
engine_version: ""
device:
type: ""
brand: ""
model: ""
os_family: Android
browser_family: Android Browser
-
user_agent: PRDownloader
os: [ ]
Expand Down
8 changes: 0 additions & 8 deletions regexes/bots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4299,14 +4299,6 @@
name: 'Ghost Inspector, Inc.'
url: 'https://www.ghostinspector.com/'

- regex: 'Cypress/[\d.]+'
name: 'Cypress'
category: 'Site Monitor'
url: 'https://github.com/cypress-io/cypress'
producer:
name: 'Cypress.io, Inc.'
url: 'https://www.cypress.io/'

- regex: 'Google-Apps-Script'
name: 'Google Apps Script'
category: 'Service Agent'
Expand Down
2 changes: 1 addition & 1 deletion regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3290,7 +3290,7 @@
version: '$1'

#Android Browser
- regex: '(?<! like )Android'
- regex: '(?<! like )Android(?!\.)'
name: 'Android Browser'
version: ''
engine:
Expand Down
23 changes: 20 additions & 3 deletions regexes/client/libraries.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
###############

- regex: 'PhantomJS(?:/(\d+[.\d]+))?'
name: 'PhantomJS'
version: '$1'
url: 'https://phantomjs.org/'

- regex: 'IPinfoClient/.*/(\d+[.\d]+)'
name: 'IPinfo'
version: '$1'
Expand Down Expand Up @@ -71,7 +76,7 @@
url: 'https://azure.microsoft.com/en-us/products/data-factory/'

# Dart
- regex: 'Dart(?:/(\d+[.\d]+))?'
- regex: 'Dart/(\d+[.\d]+)'
name: 'Dart'
version: '$1'
url: 'https://dart.dev/'
Expand Down Expand Up @@ -124,6 +129,18 @@
version: '$1'
url: 'https://www.slimerjs.org/'

# Jaunt
- regex: 'Jaunt/(\d+[.\d]+)'
name: 'Jaunt'
version: '$1'
url: 'https://jaunt-api.com/'

# Cypress
- regex: 'Cypress/(\d+[.\d]+)'
name: 'Cypress'
version: '$1'
url: 'https://github.com/cypress-io/cypress'

- regex: 'Wget(?:/(\d+[.\d]+))?'
name: 'Wget'
version: '$1'
Expand Down Expand Up @@ -162,7 +179,7 @@
name: 'Java HTTP Client'
version: '$1'

- regex: 'Java(?:/?(\d+[.\d]+))?'
- regex: 'Java/?(\d+[.\d]+)'
name: 'Java'
version: '$1'

Expand Down Expand Up @@ -215,7 +232,7 @@
version: '$1'
url: 'https://github.com/lostisland/faraday'

- regex: '(?:Go-http-client|Go )/?(?:(\d+[.\d]+))?(?: package http)?'
- regex: '(?:Go-http-client|^Go )/?(?:(\d+[.\d]+))?(?: package http)?'
name: 'Go-http-client'
version: '$1'

Expand Down
4 changes: 0 additions & 4 deletions regexes/client/mediaplayers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@
name: 'mpv'
version: '$1'

- regex: 'foobar2000(?:/([\w\.]+))?'
name: 'foobar2000'
version: '$1'

- regex: 'HTC Streaming Player'
name: 'HTC Streaming Player'
version: ''
Expand Down
54 changes: 52 additions & 2 deletions regexes/client/mobile_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -553,13 +553,23 @@
version: '$1'

# TikTok (https://apps.apple.com/app/id835599320 | https://play.google.com/store/apps/details?id=com.zhiliaoapp.musically)
- regex: 'AppName/musical_ly app_version/(\d+\.(?:[.\d]+))?'
- regex: 'AppName/(?:musical_ly|trill) app_version/([\d.]+)'
name: 'TikTok'
version: '$1'
- regex: '(?:TikTok[/ ]|com\.zhiliaoapp\.musically|musical_ly_|trill_)(\d+\.(?:[.\d]+))?'
name: 'TikTok'
version: '$1'

# TikTok Lite (https://play.google.com/store/apps/details?id=com.zhiliaoapp.musically.go)
- regex: '(?:musically_go|ultralite) app_version/([\d.]+)'
name: 'TikTok Lite'
version: '$1'

# Douyin (https://apps.apple.com/cn/app/%E6%8A%96%E9%9F%B3/id1142110895 | https://play.google.com/store/apps/details?id=com.ss.android.ugc.aweme.mobile)
- regex: 'aweme(?: app_version)?/([\d.]+)'
name: 'Douyin'
version: '$1'

# https://apps.apple.com/app/id1026349850
- regex: 'Copied/(\d+[.\d]+) CFNetwork'
name: 'Copied'
Expand Down Expand Up @@ -2570,8 +2580,48 @@
name: 'TopSecret Chat'
version: '$1'

# Kwai (https://play.google.com/store/apps/details?id=com.kwai.video)
- regex: 'Kwai/([\d.]+)'
name: 'Kwai'
version: '$1'

# Kwai Pro
- regex: 'Kwai_Pro/([\d.]+)'
name: 'Kwai Pro'
version: '$1'

# SOOP (https://www.sooplive.com/)
- regex: 'Sooplive Webview/([\d.]+)'
name: 'SOOP'
version: '$1'

# GoEuro
- regex: 'GoEuro(?:Android|IOS )/([\d.]+)'
name: 'GoEuro'
version: '$1'

# Boom360 (https://apps.apple.com/en/app/boom360/id1546629853)
- regex: 'BOOM v([\d.]+)'
name: 'Boom360'
version: '$1'

# Walla News (https://apps.apple.com/us/app/%D7%95%D7%95%D7%90%D7%9C%D7%94/id336751384)
- regex: 'WallaNews/([\d.]+)'
name: 'Walla News'
version: '$1'

# TRP Retail Locator (https://apps.apple.com/us/app/trp-retailer-locator/id628141493)
- regex: 'TRP_iPhone_App/([\d.]+)'
name: 'TRP Retail Locator'
version: '$1'

# TownNews Now (https://apps.apple.com/us/app/townnews-now/id1434301627)
- regex: 'Townnews-Now/([\d.]+)'
name: 'TownNews Now'
version: '$1'

# Electron generic apps
- regex: ' (?!(?:AppleWebKit|brave|Franz|Mailspring|Notion|Basecamp|Evernote|catalyst|ramboxpro|BlueMail|BeakerBrowser|Dezor|TweakStyle|Colibri|Polypane|Singlebox|Skye|VibeMate|(?:d|LT|Glass|Sushi|Flash|OhHai)Browser|Sizzy))([a-z0-9]*)(?:-desktop|-electron-app)?/(\d+\.[\d.]+).*Electron/'
- regex: ' (?!(?:AppleWebKit|brave|Cypress|Franz|Mailspring|Notion|Basecamp|Evernote|catalyst|ramboxpro|BlueMail|BeakerBrowser|Dezor|TweakStyle|Colibri|Polypane|Singlebox|Skye|VibeMate|(?:d|LT|Glass|Sushi|Flash|OhHai)Browser|Sizzy))([a-z0-9]*)(?:-desktop|-electron-app)?/(\d+\.[\d.]+).*Electron/'
name: '$1'
version: '$2'

Expand Down

0 comments on commit 55eac16

Please sign in to comment.