Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more bot platforms #542

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions src/parser-platforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,105 @@ export default [
},
},

/* AmazonBot */
{
test: [/Amazonbot/i],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

describe() {
return {
type: PLATFORMS_MAP.bot,
vendor: 'Amazon',
};
},
},

/* Baidu */
{
test: [/baiduspider/i],
Copy link
Contributor Author

@luciomartinez luciomartinez Aug 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

describe() {
return {
type: PLATFORMS_MAP.bot,
vendor: 'Baidu',
};
},
},

/* Bingbot */
{
test: [/bingbot/i],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

describe() {
return {
type: PLATFORMS_MAP.bot,
vendor: 'Bing',
};
},
},

/* DuckDuckBot */
{
test: [/duckduckbot/i],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

describe() {
return {
type: PLATFORMS_MAP.bot,
vendor: 'DuckDuckGo',
};
},
},

/* Internet Archive Crawler */
{
test: [/ia_archiver/i],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

describe() {
return {
type: PLATFORMS_MAP.bot,
vendor: 'Internet Archive',
};
},
},

/* Meta Web Crawler */
{
test: [/facebookexternalhit/i, /facebookcatalog/i],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

describe() {
return {
type: PLATFORMS_MAP.bot,
vendor: 'Meta',
};
},
},

/* Yahoo! Slurp */
{
test: [/yahoo/i],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

describe() {
return {
type: PLATFORMS_MAP.bot,
vendor: 'Yahoo',
};
},
},

/* Yandex */
{
test: [/yandexbot/i, /yandexmobilebot/i],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

describe() {
return {
type: PLATFORMS_MAP.bot,
vendor: 'Yandex',
};
},
},

/* Pingdom */
{
test: [/pingdom/i],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best guest I suppose 🙂

describe() {
return {
type: PLATFORMS_MAP.bot,
vendor: 'Pingdom',
};
},
},

/* Huawei */
{
test: [/huawei/i],
Expand Down
159 changes: 159 additions & 0 deletions test/acceptance/useragentstrings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2535,6 +2535,165 @@
vendor: "Google"
engine:
name: "Blink"
AmazonBot:
-
ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.2.5 (Amazonbot/0.1; +https://developer.amazon.com/support/amazonbot)"
spec:
browser:
name: "AmazonBot"
version: "0.1"
os:
name: "macOS"
version: "10.10.1"
versionName: "Yosemite"
platform:
type: "bot"
vendor: "Amazon"
engine: {}
BingCrawler:
-
ua: "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/"
spec:
browser:
name: "BingCrawler"
version: "2.0"
os: {}
platform:
type: "bot"
vendor: "Bing"
engine: {}
-
ua: "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) 80.0.345.0 Safari/537.36"
spec:
browser:
name: "BingCrawler"
version: "2.0"
os: {}
platform:
type: "bot"
vendor: "Bing"
engine: {}
-
ua: "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.345.0 Mobile Safari/537.36 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
spec:
browser:
name: "BingCrawler"
version: "2.0"
os:
name: "Android"
version: "6.0.1"
platform:
type: "bot"
vendor: "Bing"
engine: {}
BaiduSpider:
-
ua: "Baiduspider"
spec:
browser:
name: "BaiduSpider"
os: {}
platform:
type: "bot"
vendor: "Baidu"
engine: {}
DuckDuckBot:
-
ua: "DuckDuckBot/1.1; (+http://duckduckgo.com/duckduckbot.html)"
spec:
browser:
name: "DuckDuckBot"
version: "1.1"
os: {}
platform:
type: "bot"
vendor: "DuckDuckGo"
engine: {}
InternetArchiveCrawler:
-
ua: "ia_archiver"
spec:
browser:
name: "InternetArchiveCrawler"
os: {}
platform:
type: "bot"
vendor: "InternetArchive"
engine: {}
MetaWebCrawler:
-
ua: "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"
spec:
browser:
name: "MetaWebCrawler"
os: {}
platform:
type: "bot"
vendor: "Meta"
engine: {}
-
ua: "facebookexternalhit/1.1"
spec:
browser:
name: "MetaWebCrawler"
os: {}
platform:
type: "bot"
vendor: "Meta"
engine: {}
-
ua: "facebookcatalog/1.0"
spec:
browser:
name: "MetaWebCrawler"
os: {}
platform:
type: "bot"
vendor: "Meta"
engine: {}
YahooSlurp:
-
ua: "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"
spec:
browser:
name: "YahooSlurp"
os: {}
platform:
type: "bot"
vendor: "Yahoo"
engine: {}
YandexBot:
-
ua: "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)"
spec:
browser:
name: "YandexBot"
os: {}
platform:
type: "bot"
vendor: "Yandex"
engine: {}
-
ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 8_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B411 Safari/600.1.4 (compatible; YandexMobileBot/3.0; +http://yandex.com/bots)"
spec:
browser:
name: "YandexBot"
os: {}
platform:
type: "bot"
vendor: "Yandex"
engine: {}
PingdomBot:
-
ua: "Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)"
spec:
browser:
name: "PingdomBot"
os: {}
platform:
type: "bot"
vendor: "Pingdom"
engine: {}
WeChat:
-
ua: "Mozilla/5.0 (iPad; U; CPU OS 9 like Mac OS X; en-us; iPad4,4) AppleWebKit/534.46 (KHTML, like Gecko) MicroMessenger/6.5.2.501 U3/1 Safari/7543.48.3"
Expand Down
Loading