diff --git a/src/constants.js b/src/constants.js index 8fc5190..0fdbcc9 100644 --- a/src/constants.js +++ b/src/constants.js @@ -39,6 +39,7 @@ export const BROWSER_ALIASES_MAP = { PhantomJS: 'phantomjs', PingdomBot: 'pingdombot', PerplexityBot: 'perplexitybot', + 'Perplexity-User': 'perplexity_user', Puffin: 'puffin', QQ: 'qq', QQLite: 'qqlite', @@ -98,6 +99,7 @@ export const BROWSER_MAP = { phantomjs: 'PhantomJS', pingdombot: 'PingdomBot', perplexitybot: 'PerplexityBot', + perplexity_user: 'Perplexity-User', oai_searchbot: 'OAI-SearchBot', omgilibot: 'Omgilibot', puffin: 'Puffin', diff --git a/src/parser-browsers.js b/src/parser-browsers.js index 51a4f9d..b2beb41 100644 --- a/src/parser-browsers.js +++ b/src/parser-browsers.js @@ -147,6 +147,16 @@ const browsersList = [ }, }, + /* Perplexity-User */ + { + test: [/perplexity-user/i], + describe(ua) { + const browser = { + name: 'Perplexity-User', + }; + }, + }, + /* YouBot */ { test: [/youbot/i], diff --git a/src/parser-platforms.js b/src/parser-platforms.js index 5258424..26ebc1a 100644 --- a/src/parser-platforms.js +++ b/src/parser-platforms.js @@ -139,6 +139,17 @@ export default [ }, }, + /* Perplexity-User */ + { + test: [/perplexity-user/i], + describe() { + return { + type: PLATFORMS_MAP.bot, + vendor: 'Perplexity AI', + }; + }, + }, + /* YouBot */ { test: [/youbot/i], diff --git a/test/acceptance/useragentstrings.yml b/test/acceptance/useragentstrings.yml index fcd4063..bd942de 100644 --- a/test/acceptance/useragentstrings.yml +++ b/test/acceptance/useragentstrings.yml @@ -2649,7 +2649,7 @@ engine: {} PerplexityBot: - - ua: "Mozilla/5.0 (compatible; PerplexityBot/1.0; +https://www.perplexity.ai/bot)" + ua: "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; PerplexityBot/1.0; +https://perplexity.ai/perplexitybot)" spec: browser: name: "PerplexityBot" @@ -2659,6 +2659,18 @@ type: "bot" vendor: "Perplexity AI" engine: {} + Perplexity‑User: + - + ua: "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Perplexity-User/1.0; +https://perplexity.ai/perplexity-user)" + spec: + browser: + name: "Perplexity-User" + version: "1.0" + os: {} + platform: + type: "bot" + vendor: "Perplexity AI" + engine: {} YouBot: - ua: "Mozilla/5.0 (compatible; YouBot/1.0; +https://you.com/bot)"