Add Yahoo! Japan to Crawler, Fetcher, & InApp browser

This commit is contained in:
Faisal Salman 2024-06-22 00:13:13 +07:00
parent 81cbbe504e
commit a74ace8dd1
3 changed files with 62 additions and 52 deletions

View File

@ -39,43 +39,40 @@ const CLIs = Object.freeze({
const Crawlers = Object.freeze({ const Crawlers = Object.freeze({
browser : [ browser : [
// Amazonbot - https://developer.amazon.com/amazonbot [
// Applebot - http://apple.com/go/applebot // Amazonbot - https://developer.amazon.com/amazonbot
// Bingbot - http://www.bing.com/bingbot.htm // Applebot - http://apple.com/go/applebot
// DuckDuckBot - http://duckduckgo.com/duckduckbot.html // Bingbot - http://www.bing.com/bingbot.htm
// FacebookBot - https://developers.facebook.com/docs/sharing/bot/ // DuckDuckBot - http://duckduckgo.com/duckduckbot.html
// GPTBot - https://platform.openai.com/docs/gptbot // FacebookBot - https://developers.facebook.com/docs/sharing/bot/
[/((?:amazon|apple|bing|duckduck|facebook|gpt)bot)\/([\w\.]+)/i], // GPTBot - https://platform.openai.com/docs/gptbot
[NAME, VERSION, [TYPE, CRAWLER]], /((?:amazon|apple|bing|duckduck|facebook|gpt)bot)\/([\w\.]+)/i,
// Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001
/(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i,
// ClaudeBot
/(claude(?:bot|-web))\/([\w\.]+)/i,
// Googlebot - http://www.google.com/bot.html
/(google(?:bot|other)(?:-image|-video|-news|-extended)?|(?:storebot-)?google(?:-inspectiontool)?)\/?([\w\.]*)/i,
// Sogou Spider
/(sogou (?:pic|head|web|orion|news) spider)\/([\w\.]+)/i,
// Yahoo! Japan - https://support.yahoo-net.jp/PccSearch/s/article/H000007955
/(y!?j-(?:asr|br[uw]|dscv|mmp|vsidx|wsc))\/([\w\.]+)/i,
// Yandex Bots - https://yandex.com/bots
/(yandex(?:(?:mobile)?(?:accessibility|additional|renderresources|screenshot|sprav)?bot|image(?:s|resizer)|video(?:parser)?|blogs|adnet|favicons|fordomain|market|media|metrika|news|ontodb(?:api)?|pagechecker|partner|rca|tracker|turbo|vertis|webmaster|antivirus))\/([\w\.]+)/i
],
// Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001
[/(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i],
[NAME, VERSION, [TYPE, CRAWLER]], [NAME, VERSION, [TYPE, CRAWLER]],
// Bytespider // Bytespider
// Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp // Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp
[/((?:bytespider|(?=yahoo! )slurp))/i], [/((?:bytespider|(?=yahoo! )slurp))/i],
[NAME, [TYPE, CRAWLER]], [NAME, [TYPE, CRAWLER]]
// ClaudeBot
[/(claude(?:bot|-web))\/([\w\.]+)/i],
[NAME, VERSION, [TYPE, CRAWLER]],
// Googlebot - http://www.google.com/bot.html
[
/(google(?:bot|other)(?:-image|-video|-news|-extended)?|(?:storebot-)?google(?:-inspectiontool)?)\/?([\w\.]*)/i
],
[NAME, VERSION, [TYPE, CRAWLER]],
// Sogou Spider
[/(sogou (?:pic|head|web|orion|news) spider)\/([\w\.]+)/i],
[NAME, VERSION, [TYPE, CRAWLER]],
// Yandex Bots - https://yandex.com/bots
[
/(yandex(?:(?:mobile)?(?:accessibility|additional|renderresources|screenshot|sprav)?bot|image(?:s|resizer)|video(?:parser)?|blogs|adnet|favicons|fordomain|market|media|metrika|news|ontodb(?:api)?|pagechecker|partner|rca|tracker|turbo|vertis|webmaster|antivirus))\/([\w\.]+)/i
],
[NAME, VERSION, [TYPE, CRAWLER]]
] ]
}); });
@ -176,30 +173,29 @@ const Emails = Object.freeze({
const Fetchers = Object.freeze({ const Fetchers = Object.freeze({
browser : [ browser : [
// ChatGPT-User - https://platform.openai.com/docs/plugins/bot [
// BingPreview / Mastodon / Pinterestbot / Redditbot / Telegrambot / Twitterbot // ChatGPT-User - https://platform.openai.com/docs/plugins/bot
[/(bingpreview|chatgpt-user|mastodon|(?:discord|linkedin|pinterest|reddit|telegram|twitter)bot)\/([\w\.]+)/i], // BingPreview / Mastodon / Pinterestbot / Redditbot / Telegrambot / Twitterbot
/(bingpreview|chatgpt-user|mastodon|(?:discord|linkedin|pinterest|reddit|telegram|twitter)bot)\/([\w\.]+)/i,
// Slackbot - https://api.slack.com/robots
/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
// WhatsApp
/(whatsapp)\/([\w\.]+)[\/ ][ianw]/i,
// Yahoo! Japan
/(y!?j-dlc)\/([\w\.]+)/i,
// Yandex Bots - https://yandex.com/bots
/(yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
/(yandex(?:sitelinks|userproxy))/i
],
[NAME, VERSION, [TYPE, FETCHER]], [NAME, VERSION, [TYPE, FETCHER]],
// Google Bots / Snapchat // Google Bots / Snapchat
[/(feedfetcher-google|google-read-aloud|(?=bot; )snapchat)/i], [/(feedfetcher-google|google-read-aloud|(?=bot; )snapchat)/i],
[NAME, [TYPE, FETCHER]], [NAME, [TYPE, FETCHER]],
// Slackbot - https://api.slack.com/robots
[/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i],
[NAME, VERSION, [TYPE, FETCHER]],
// WhatsApp
[/(whatsapp)\/([\w\.]+)[\/ ][ianw]/i],
[NAME, VERSION, [TYPE, FETCHER]],
// Yandex Bots - https://yandex.com/bots
[
/(yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
/(yandex(?:sitelinks|userproxy))/i
],
[NAME, VERSION, [TYPE, FETCHER]]
] ]
}); });
@ -209,7 +205,11 @@ const Fetchers = Object.freeze({
const InApps = Object.freeze({ const InApps = Object.freeze({
browser : [ browser : [
[/chatlyio\/([\d\.]+)/i], [VERSION, 'Slack', [TYPE, INAPP]] // Slack
[/chatlyio\/([\d\.]+)/i], [VERSION, 'Slack', [TYPE, INAPP]],
// Yahoo! Japan
[/jp\.co\.yahoo\.android\.yjtop\/([\d\.]+)/i], [VERSION, 'Yahoo! Japan', [TYPE, INAPP]]
] ]
}); });

View File

@ -11,7 +11,7 @@
/*jshint esversion: 6 */ /*jshint esversion: 6 */
import { CPU, OS, Engine } from '../enums/ua-parser-enums'; import { CPU, OS, Engine } from '../enums/ua-parser-enums.mjs';
const isAppleSilicon = (res) => res.os.is(OS.MACOS) && res.cpu.is(CPU.ARM); const isAppleSilicon = (res) => res.os.is(OS.MACOS) && res.cpu.is(CPU.ARM);

View File

@ -79,6 +79,16 @@
"type" : "crawler" "type" : "crawler"
} }
}, },
{
"desc" : "Yahoo! Japan",
"ua" : "Y!J-BRW/1.0 (https://www.yahoo-help.jp/app/answers/detail/p/595/a_id/42716)",
"expect" :
{
"name" : "Y!J-BRW",
"version" : "1.0",
"type" : "crawler"
}
},
{ {
"desc" : "YandexBot", "desc" : "YandexBot",
"ua" : "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)", "ua" : "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)",