1
0
mirror of https://github.com/lancedikson/bowser synced 2025-12-05 06:02:14 +00:00

tests fix pt.1

This commit is contained in:
naorpeled 2025-11-22 15:49:45 +02:00
parent 4050a25bd2
commit bb05390d43
2 changed files with 7 additions and 30 deletions

View File

@ -133,19 +133,10 @@ const browsersList = [
/* MetaWebCrawler */
{
test: [/facebookexternalhit/i, /facebookcatalog/i],
describe(ua) {
const browser = {
describe() {
return {
name: 'MetaWebCrawler',
};
const version = Utils.getFirstMatch(/facebookexternalhit\/(\d+(\.\d+)+)/i, ua)
|| Utils.getFirstMatch(/facebookcatalog\/(\d+(\.\d+)+)/i, ua)
|| Utils.getFirstMatch(commonVersionIdentifier, ua);
if (version) {
browser.version = version;
}
return browser;
},
},
@ -162,34 +153,20 @@ const browsersList = [
/* YandexBot */
{
test: [/yandexbot/i, /yandexmobilebot/i],
describe(ua) {
const browser = {
describe() {
return {
name: 'YandexBot',
};
const version = Utils.getFirstMatch(/yandex(?:bot|mobilebot)\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
if (version) {
browser.version = version;
}
return browser;
},
},
/* PingdomBot */
{
test: [/pingdom/i],
describe(ua) {
const browser = {
describe() {
return {
name: 'PingdomBot',
};
const version = Utils.getFirstMatch(/version[_/](\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(/pingdom\.com_bot_.*?(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
if (version) {
browser.version = version;
}
return browser;
},
},

View File

@ -2618,7 +2618,7 @@
os: {}
platform:
type: "bot"
vendor: "InternetArchive"
vendor: "Internet Archive"
engine: {}
MetaWebCrawler:
-