mirror of
https://github.com/lancedikson/bowser
synced 2025-12-05 06:02:14 +00:00
wip
This commit is contained in:
parent
fdd5a5e8e6
commit
a5dd57db07
@ -1,7 +1,6 @@
|
|||||||
// NOTE: this list must be up-to-date with browsers listed in
|
// NOTE: this list must be up-to-date with browsers listed in
|
||||||
// test/acceptance/useragentstrings.yml
|
// test/acceptance/useragentstrings.yml
|
||||||
export const BROWSER_ALIASES_MAP = {
|
export const BROWSER_ALIASES_MAP = {
|
||||||
'Applebot-Extended': 'applebot_extended',
|
|
||||||
AmazonBot: 'amazonbot',
|
AmazonBot: 'amazonbot',
|
||||||
'Amazon Silk': 'amazon_silk',
|
'Amazon Silk': 'amazon_silk',
|
||||||
'Android Browser': 'android',
|
'Android Browser': 'android',
|
||||||
@ -17,12 +16,10 @@ export const BROWSER_ALIASES_MAP = {
|
|||||||
DuckDuckBot: 'duckduckbot',
|
DuckDuckBot: 'duckduckbot',
|
||||||
Electron: 'electron',
|
Electron: 'electron',
|
||||||
Epiphany: 'epiphany',
|
Epiphany: 'epiphany',
|
||||||
FacebookBot: 'facebookbot',
|
|
||||||
Firefox: 'firefox',
|
Firefox: 'firefox',
|
||||||
Focus: 'focus',
|
Focus: 'focus',
|
||||||
Generic: 'generic',
|
Generic: 'generic',
|
||||||
'Google Search': 'google_search',
|
'Google Search': 'google_search',
|
||||||
'Google-Extended': 'google_extended',
|
|
||||||
Googlebot: 'googlebot',
|
Googlebot: 'googlebot',
|
||||||
GPTBot: 'gptbot',
|
GPTBot: 'gptbot',
|
||||||
'Internet Explorer': 'ie',
|
'Internet Explorer': 'ie',
|
||||||
@ -30,6 +27,7 @@ export const BROWSER_ALIASES_MAP = {
|
|||||||
'K-Meleon': 'k_meleon',
|
'K-Meleon': 'k_meleon',
|
||||||
Maxthon: 'maxthon',
|
Maxthon: 'maxthon',
|
||||||
MetaWebCrawler: 'metawebcrawler',
|
MetaWebCrawler: 'metawebcrawler',
|
||||||
|
'Meta-WebIndexer': 'meta_webindexer',
|
||||||
'Microsoft Edge': 'edge',
|
'Microsoft Edge': 'edge',
|
||||||
'MZ Browser': 'mz',
|
'MZ Browser': 'mz',
|
||||||
'NAVER Whale Browser': 'naver',
|
'NAVER Whale Browser': 'naver',
|
||||||
@ -64,7 +62,6 @@ export const BROWSER_ALIASES_MAP = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const BROWSER_MAP = {
|
export const BROWSER_MAP = {
|
||||||
applebot_extended: 'Applebot-Extended',
|
|
||||||
amazonbot: 'AmazonBot',
|
amazonbot: 'AmazonBot',
|
||||||
amazon_silk: 'Amazon Silk',
|
amazon_silk: 'Amazon Silk',
|
||||||
android: 'Android Browser',
|
android: 'Android Browser',
|
||||||
@ -81,11 +78,9 @@ export const BROWSER_MAP = {
|
|||||||
edge: 'Microsoft Edge',
|
edge: 'Microsoft Edge',
|
||||||
electron: 'Electron',
|
electron: 'Electron',
|
||||||
epiphany: 'Epiphany',
|
epiphany: 'Epiphany',
|
||||||
facebookbot: 'FacebookBot',
|
|
||||||
firefox: 'Firefox',
|
firefox: 'Firefox',
|
||||||
focus: 'Focus',
|
focus: 'Focus',
|
||||||
generic: 'Generic',
|
generic: 'Generic',
|
||||||
google_extended: 'Google-Extended',
|
|
||||||
google_search: 'Google Search',
|
google_search: 'Google Search',
|
||||||
googlebot: 'Googlebot',
|
googlebot: 'Googlebot',
|
||||||
gptbot: 'GPTBot',
|
gptbot: 'GPTBot',
|
||||||
@ -94,6 +89,7 @@ export const BROWSER_MAP = {
|
|||||||
k_meleon: 'K-Meleon',
|
k_meleon: 'K-Meleon',
|
||||||
maxthon: 'Maxthon',
|
maxthon: 'Maxthon',
|
||||||
metawebcrawler: 'MetaWebCrawler',
|
metawebcrawler: 'MetaWebCrawler',
|
||||||
|
meta_webindexer: 'Meta-WebIndexer',
|
||||||
mz: 'MZ Browser',
|
mz: 'MZ Browser',
|
||||||
naver: 'NAVER Whale Browser',
|
naver: 'NAVER Whale Browser',
|
||||||
opera: 'Opera',
|
opera: 'Opera',
|
||||||
|
|||||||
@ -79,40 +79,6 @@ const browsersList = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Google-Extended */
|
|
||||||
{
|
|
||||||
test: [/google-extended/i],
|
|
||||||
describe(ua) {
|
|
||||||
const browser = {
|
|
||||||
name: 'Google-Extended',
|
|
||||||
};
|
|
||||||
const version = Utils.getFirstMatch(/google-extended\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
||||||
|
|
||||||
if (version) {
|
|
||||||
browser.version = version;
|
|
||||||
}
|
|
||||||
|
|
||||||
return browser;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
/* Applebot-Extended */
|
|
||||||
{
|
|
||||||
test: [/applebot-extended/i],
|
|
||||||
describe(ua) {
|
|
||||||
const browser = {
|
|
||||||
name: 'Applebot-Extended',
|
|
||||||
};
|
|
||||||
const version = Utils.getFirstMatch(/applebot-extended\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
||||||
|
|
||||||
if (version) {
|
|
||||||
browser.version = version;
|
|
||||||
}
|
|
||||||
|
|
||||||
return browser;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
/* ClaudeBot */
|
/* ClaudeBot */
|
||||||
{
|
{
|
||||||
test: [/claudebot/i, /claude-web/i],
|
test: [/claudebot/i, /claude-web/i],
|
||||||
@ -147,23 +113,6 @@ const browsersList = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
/* FacebookBot */
|
|
||||||
{
|
|
||||||
test: [/facebookbot/i],
|
|
||||||
describe(ua) {
|
|
||||||
const browser = {
|
|
||||||
name: 'FacebookBot',
|
|
||||||
};
|
|
||||||
const version = Utils.getFirstMatch(/facebookbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
||||||
|
|
||||||
if (version) {
|
|
||||||
browser.version = version;
|
|
||||||
}
|
|
||||||
|
|
||||||
return browser;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
/* Diffbot */
|
/* Diffbot */
|
||||||
{
|
{
|
||||||
test: [/diffbot/i],
|
test: [/diffbot/i],
|
||||||
@ -215,6 +164,23 @@ const browsersList = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* Meta-WebIndexer */
|
||||||
|
{
|
||||||
|
test: [/meta-webindexer/i],
|
||||||
|
describe(ua) {
|
||||||
|
const browser = {
|
||||||
|
name: 'Meta-WebIndexer',
|
||||||
|
};
|
||||||
|
const version = Utils.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
||||||
|
|
||||||
|
if (version) {
|
||||||
|
browser.version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
return browser;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
/* Googlebot */
|
/* Googlebot */
|
||||||
{
|
{
|
||||||
test: [/googlebot/i],
|
test: [/googlebot/i],
|
||||||
|
|||||||
@ -29,6 +29,39 @@ export default [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* GPTBot */
|
||||||
|
{
|
||||||
|
test: [/gptbot/i],
|
||||||
|
describe() {
|
||||||
|
return {
|
||||||
|
type: PLATFORMS_MAP.bot,
|
||||||
|
vendor: 'OpenAI',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
/* ChatGPT-User */
|
||||||
|
{
|
||||||
|
test: [/chatgpt-user/i],
|
||||||
|
describe() {
|
||||||
|
return {
|
||||||
|
type: PLATFORMS_MAP.bot,
|
||||||
|
vendor: 'OpenAI',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
/* OAI-SearchBot */
|
||||||
|
{
|
||||||
|
test: [/oai-searchbot/i],
|
||||||
|
describe() {
|
||||||
|
return {
|
||||||
|
type: PLATFORMS_MAP.bot,
|
||||||
|
vendor: 'OpenAI',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
/* Baidu */
|
/* Baidu */
|
||||||
{
|
{
|
||||||
test: [/baiduspider/i],
|
test: [/baiduspider/i],
|
||||||
@ -62,6 +95,61 @@ export default [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* ClaudeBot */
|
||||||
|
{
|
||||||
|
test: [/claudebot/i, /claude-web/i, /claude-user/i, /claude-searchbot/i],
|
||||||
|
describe() {
|
||||||
|
return {
|
||||||
|
type: PLATFORMS_MAP.bot,
|
||||||
|
vendor: 'Anthropic',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Omgilibot */
|
||||||
|
{
|
||||||
|
test: [/omgilibot/i, /webzio-extended/i],
|
||||||
|
describe() {
|
||||||
|
return {
|
||||||
|
type: PLATFORMS_MAP.bot,
|
||||||
|
vendor: 'Omgili',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Diffbot */
|
||||||
|
{
|
||||||
|
test: [/diffbot/i],
|
||||||
|
describe() {
|
||||||
|
return {
|
||||||
|
type: PLATFORMS_MAP.bot,
|
||||||
|
vendor: 'Diffbot',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
/* PerplexityBot */
|
||||||
|
{
|
||||||
|
test: [/perplexitybot/i],
|
||||||
|
describe() {
|
||||||
|
return {
|
||||||
|
type: PLATFORMS_MAP.bot,
|
||||||
|
vendor: 'Perplexity AI',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
/* YouBot */
|
||||||
|
{
|
||||||
|
test: [/youbot/i],
|
||||||
|
describe() {
|
||||||
|
return {
|
||||||
|
type: PLATFORMS_MAP.bot,
|
||||||
|
vendor: 'You.com',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
/* Internet Archive Crawler */
|
/* Internet Archive Crawler */
|
||||||
{
|
{
|
||||||
test: [/ia_archiver/i],
|
test: [/ia_archiver/i],
|
||||||
@ -73,6 +161,17 @@ export default [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* Meta-WebIndexer */
|
||||||
|
{
|
||||||
|
test: [/meta-webindexer/i],
|
||||||
|
describe() {
|
||||||
|
return {
|
||||||
|
type: PLATFORMS_MAP.bot,
|
||||||
|
vendor: 'Meta',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
/* Meta Web Crawler */
|
/* Meta Web Crawler */
|
||||||
{
|
{
|
||||||
test: [/facebookexternalhit/i, /facebookcatalog/i],
|
test: [/facebookexternalhit/i, /facebookcatalog/i],
|
||||||
|
|||||||
@ -2560,7 +2560,8 @@
|
|||||||
platform:
|
platform:
|
||||||
type: "bot"
|
type: "bot"
|
||||||
vendor: "OpenAI"
|
vendor: "OpenAI"
|
||||||
engine: {}
|
engine:
|
||||||
|
name: "Blink"
|
||||||
ChatGPT-User:
|
ChatGPT-User:
|
||||||
-
|
-
|
||||||
ua: "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ChatGPT-User/1.0; +https://openai.com/bot)"
|
ua: "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ChatGPT-User/1.0; +https://openai.com/bot)"
|
||||||
@ -2572,7 +2573,8 @@
|
|||||||
platform:
|
platform:
|
||||||
type: "bot"
|
type: "bot"
|
||||||
vendor: "OpenAI"
|
vendor: "OpenAI"
|
||||||
engine: {}
|
engine:
|
||||||
|
name: "Blink"
|
||||||
OAI-SearchBot:
|
OAI-SearchBot:
|
||||||
-
|
-
|
||||||
ua: "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; OAI-SearchBot/1.0; +https://openai.com/searchbot)"
|
ua: "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; OAI-SearchBot/1.0; +https://openai.com/searchbot)"
|
||||||
@ -2584,34 +2586,8 @@
|
|||||||
platform:
|
platform:
|
||||||
type: "bot"
|
type: "bot"
|
||||||
vendor: "OpenAI"
|
vendor: "OpenAI"
|
||||||
engine: {}
|
|
||||||
Google-Extended:
|
|
||||||
-
|
|
||||||
ua: "Mozilla/5.0 (compatible; Google-Extended; +https://developers.google.com/search/help/google-extended)"
|
|
||||||
spec:
|
|
||||||
browser:
|
|
||||||
name: "Google-Extended"
|
|
||||||
os: {}
|
|
||||||
platform:
|
|
||||||
type: "bot"
|
|
||||||
vendor: "Google"
|
|
||||||
engine: {}
|
|
||||||
Applebot-Extended:
|
|
||||||
-
|
|
||||||
ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15 (compatible; Applebot-Extended/1.0; +https://support.apple.com/applebot)"
|
|
||||||
spec:
|
|
||||||
browser:
|
|
||||||
name: "Applebot-Extended"
|
|
||||||
version: "1.0"
|
|
||||||
os:
|
|
||||||
name: "macOS"
|
|
||||||
version: "10.15.7"
|
|
||||||
versionName: "Catalina"
|
|
||||||
platform:
|
|
||||||
type: "bot"
|
|
||||||
vendor: "Apple"
|
|
||||||
engine:
|
engine:
|
||||||
name: "WebKit"
|
name: "Blink"
|
||||||
ClaudeBot:
|
ClaudeBot:
|
||||||
-
|
-
|
||||||
ua: "Mozilla/5.0 (compatible; ClaudeBot/1.0; +https://www.anthropic.com/claudebot)"
|
ua: "Mozilla/5.0 (compatible; ClaudeBot/1.0; +https://www.anthropic.com/claudebot)"
|
||||||
@ -2636,13 +2612,13 @@
|
|||||||
type: "bot"
|
type: "bot"
|
||||||
vendor: "Omgili"
|
vendor: "Omgili"
|
||||||
engine: {}
|
engine: {}
|
||||||
FacebookBot:
|
Meta-WebIndexer:
|
||||||
-
|
-
|
||||||
ua: "Mozilla/5.0 (compatible; FacebookBot/1.0; +https://developers.facebook.com/docs/sharing/best-practices#crawl)"
|
ua: "Mozilla/5.0 (compatible; meta-webindexer/1.1; +http://developer.facebook.com/docs/sharing/webmasters/crawler)"
|
||||||
spec:
|
spec:
|
||||||
browser:
|
browser:
|
||||||
name: "FacebookBot"
|
name: "Meta-WebIndexer"
|
||||||
version: "1.0"
|
version: "1.1"
|
||||||
os: {}
|
os: {}
|
||||||
platform:
|
platform:
|
||||||
type: "bot"
|
type: "bot"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user