mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-15 14:42:16 +03:00
Make it prize - 2.0.0-rc.3
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////
|
||||
/* Extensions for UAParser.js v2.0.0-beta.3
|
||||
/* Extensions for UAParser.js v2.0.0-rc.3
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
UAParser.js PRO Enterorise License */
|
||||
@@ -19,7 +19,8 @@ const CLI = 'cli';
|
||||
const EMAIL = 'email';
|
||||
const FETCHER = 'fetcher';
|
||||
const INAPP = 'inapp';
|
||||
const MODULE = 'module';
|
||||
const MEDIAPLAYER = 'mediaplayer';
|
||||
const LIBRARY = 'library';
|
||||
|
||||
//////////////////////
|
||||
// COMMAND LINE APPS
|
||||
@@ -38,43 +39,73 @@ const CLIs = Object.freeze({
|
||||
|
||||
const Crawlers = Object.freeze({
|
||||
browser : [
|
||||
// Amazonbot - https://developer.amazon.com/amazonbot
|
||||
// Applebot - http://apple.com/go/applebot
|
||||
// Bingbot - http://www.bing.com/bingbot.htm
|
||||
// DuckDuckBot - http://duckduckgo.com/duckduckbot.html
|
||||
// FacebookBot - https://developers.facebook.com/docs/sharing/bot/
|
||||
// GPTBot - https://platform.openai.com/docs/gptbot
|
||||
[/((?:amazon|apple|bing|duckduck|facebook|gpt)bot)\/([\w\.]+)/i],
|
||||
[NAME, VERSION, [TYPE, CRAWLER]],
|
||||
|
||||
// Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001
|
||||
[/(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i],
|
||||
[NAME, VERSION, [TYPE, CRAWLER]],
|
||||
|
||||
// Bytespider
|
||||
// Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp
|
||||
[/((?:bytespider|(?=yahoo! )slurp))/i],
|
||||
[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],
|
||||
// AhrefsBot - https://ahrefs.com/robot
|
||||
// Amazonbot - https://developer.amazon.com/amazonbot
|
||||
// Applebot - http://apple.com/go/applebot
|
||||
// Bingbot - http://www.bing.com/bingbot.htm
|
||||
// CCBot - https://commoncrawl.org/faq
|
||||
// Dotbot - https://moz.com/help/moz-procedures/crawlers/dotbot
|
||||
// DuckDuckBot - http://duckduckgo.com/duckduckbot.html
|
||||
// FacebookBot - https://developers.facebook.com/docs/sharing/bot/
|
||||
// GPTBot - https://platform.openai.com/docs/gptbot
|
||||
// MJ12bot - https://mj12bot.com/
|
||||
// MojeekBot - https://www.mojeek.com/bot.html
|
||||
// OpenAI's SearchGPT - https://platform.openai.com/docs/bots
|
||||
// PerplexityBot - https://perplexity.ai/perplexitybot
|
||||
// SemrushBot - http://www.semrush.com/bot.html
|
||||
/((?:ahrefs|amazon|apple|bing|cc|dot|duckduck|exa|facebook|gpt|mj12|mojeek|oai-search|perplexity|semrush)bot)\/([\w\.]+)/i,
|
||||
|
||||
// Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001
|
||||
/(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i,
|
||||
|
||||
// ClaudeBot (Anthropic)
|
||||
/(claude(?:bot|-web))\/([\w\.]+)/i,
|
||||
|
||||
// Coc Coc Bot - https://help.coccoc.com/en/search-engine
|
||||
/(coccocbot-(?:image|web))\/([\w\.]+)/i,
|
||||
|
||||
// Facebook / Meta
|
||||
// https://developers.facebook.com/docs/sharing/webmasters/web-crawlers
|
||||
/(facebook(?:externalhit|catalog)|meta-externalagent)\/([\w\.]+)/i,
|
||||
|
||||
// Googlebot - http://www.google.com/bot.html
|
||||
/(google(?:bot|other|-inspectiontool)(?:-image|-video|-news)?|storebot-google)\/?([\w\.]*)/i,
|
||||
|
||||
// Internet Archive (archive.org)
|
||||
/(ia_archiver|archive\.org_bot)\/?([\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,
|
||||
|
||||
// Yeti (Naver)
|
||||
/(yeti)\/([\w\.]+)/i,
|
||||
|
||||
// YisouSpider
|
||||
/(yisouspider)\/?([\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
|
||||
// Google Bots
|
||||
/((?:adsbot|apis|mediapartners)-google(?:-mobile)?|google-?(?:other|cloudvertexbot|extended|safety))/i,
|
||||
|
||||
// Bytespider
|
||||
// DataForSeoBot - https://dataforseo.com/dataforseo-bot
|
||||
// Huawei AspiegelBot / PetalBot https://aspiegel.com/petalbot
|
||||
// Qihoo 360Spider
|
||||
// TurnitinBot - https://www.turnitin.com/robot/crawlerinfo.html
|
||||
// Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp
|
||||
/(360spider-?(?:image|video)?|bytespider|(?:aspiegel|dataforseo|petal|turnitin)bot|(?=yahoo! )slurp)/i
|
||||
],
|
||||
[NAME, VERSION, [TYPE, CRAWLER]]
|
||||
[NAME, [TYPE, CRAWLER]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -164,8 +195,8 @@ const ExtraDevices = Object.freeze({
|
||||
|
||||
const Emails = Object.freeze({
|
||||
browser : [
|
||||
// Microsoft Outlook / Thunderbird
|
||||
[/(microsoft outlook|thunderbird)[\s\/]([\w\.]+)/i], [NAME, VERSION, [TYPE, EMAIL]]
|
||||
// Evolution / Kontact/KMail / [Microsoft/Mac] Outlook / Thunderbird
|
||||
[/(evolution|kmail2?|kontact|(?:microsoft |mac)outlook|thunderbird)[\s\/]([\w\.]+)/i], [NAME, VERSION, [TYPE, EMAIL]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -175,29 +206,37 @@ const Emails = Object.freeze({
|
||||
|
||||
const Fetchers = Object.freeze({
|
||||
browser : [
|
||||
// BingPreview / Mastodon / Pinterestbot / Redditbot / Telegrambot / Twitterbot
|
||||
[/(bingpreview|mastodon|(?:discord|linkedin|pinterest|reddit|telegram|twitter)bot)\/([\w\.]+)/i],
|
||||
[NAME, VERSION, [TYPE, FETCHER]],
|
||||
|
||||
// Google Bots / Snapchat
|
||||
[/(feedfetcher-google|google-read-aloud|(?=bot; )snapchat)/i],
|
||||
[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
|
||||
[
|
||||
// AhrefsSiteAudit - https://ahrefs.com/robot/site-audit
|
||||
// ChatGPT-User - https://platform.openai.com/docs/plugins/bot
|
||||
// DuckAssistBot - https://duckduckgo.com/duckassistbot/
|
||||
// BingPreview / Mastodon / Pinterestbot / Redditbot / Rogerbot / Telegrambot / Twitterbot / UptimeRobot
|
||||
/(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
|
||||
|
||||
// Google Site Verifier
|
||||
/(google-site-verification)\/([\w\.]+)/i,
|
||||
|
||||
// Meta
|
||||
/(meta-externalfetcher)\/([\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
|
||||
[/(feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat)/i],
|
||||
[NAME, [TYPE, FETCHER]],
|
||||
]
|
||||
});
|
||||
|
||||
@@ -207,7 +246,11 @@ const Fetchers = Object.freeze({
|
||||
|
||||
const InApps = Object.freeze({
|
||||
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]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -220,13 +263,13 @@ const MediaPlayers = Object.freeze({
|
||||
|
||||
/(apple(?:coremedia|))\/([\w\._]+)/i, // Generic Apple CoreMedia
|
||||
/(coremedia) v([\w\._]+)/i
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(aqualung|lyssna|bsplayer)\/([\w\.-]+)/i // Aqualung/Lyssna/BSPlayer
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(ares|ossproxy)\s([\w\.-]+)/i // Ares/OSSProxy
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\/([\w\.-]+)/i,
|
||||
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC
|
||||
@@ -234,111 +277,125 @@ const MediaPlayers = Object.freeze({
|
||||
/(clementine|music player daemon)\s([\w\.-]+)/i, // Clementine/MPD
|
||||
/(lg player|nexplayer)\s([\d\.]+)/i,
|
||||
/player\/(nexplayer|lg player)\s([\w\.-]+)/i // NexPlayer/LG Player
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
/(nexplayer)\s([\w\.-]+)/i // Nexplayer
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(flrp)\/([\w\.-]+)/i // Flip Player
|
||||
], [[NAME, 'Flip Player'], VERSION], [
|
||||
], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i
|
||||
// FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit
|
||||
], [NAME], [
|
||||
/(fstream|nativehost|queryseekspider)/i
|
||||
// FStream/NativeHost/QuerySeekSpider
|
||||
], [NAME, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
|
||||
// Gstreamer
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(htc streaming player)\s[\w_]+\s\/\s([\d\.]+)/i, // HTC Streaming Player
|
||||
/(java|python-urllib|python-requests|wget|libcurl)\/([\w\.-_]+)/i,
|
||||
// Java/urllib/requests/wget/cURL
|
||||
/(lavf)([\d\.]+)/i // Lavf (FFMPEG)
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(htc_one_s)\/([\d\.]+)/i, // HTC One S
|
||||
], [[NAME, /_/g, ' '], VERSION], [
|
||||
], [[NAME, /_/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(mplayer)(?:\s|\/)(?:(?:sherpya-){0,1}svn)(?:-|\s)(r\d+(?:-\d+[\w\.-]+))/i,
|
||||
// MPlayer SVN
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(mplayer)(?:\s|\/)([\w\.-]+)/i, // MPlayer
|
||||
/(mplayer) unknown-([\w\.\-]+)/i // MPlayer UNKNOWN
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(mplayer)/i, // MPlayer (no other info)
|
||||
/(yourmuze)/i, // YourMuze
|
||||
/(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime
|
||||
], [NAME], [
|
||||
], [NAME, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(nero (?:home|scout))\/([\w\.-]+)/i // Nero Home/Nero Scout
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(nokia\d+)\/([\w\.-]+)/i // Nokia
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/\s(songbird)\/([\w\.-]+)/i // Songbird/Philips-Songbird
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(winamp)3 version ([\w\.-]+)/i, // Winamp
|
||||
/(winamp)\s([\w\.-]+)/i,
|
||||
/(winamp)mpeg\/([\w\.-]+)/i
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
|
||||
// inlight radio
|
||||
], [NAME], [
|
||||
], [NAME, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\/([\w\.-]+)/i
|
||||
// QuickTime/RealMedia/RadioApp/RadioClientApplication/
|
||||
// SoundTap/Totem/Stagefright/Streamium
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(smp)([\d\.]+)/i // SMP
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(vlc) media player - version ([\w\.]+)/i, // VLC Videolan
|
||||
/(vlc)\/([\w\.-]+)/i,
|
||||
/(xbmc|gvfs|xine|xmms|irapp)\/([\w\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp
|
||||
/(foobar2000)\/([\d\.]+)/i, // Foobar2000
|
||||
/(itunes)\/([\d\.]+)/i // iTunes
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(wmplayer)\/([\w\.-]+)/i, // Windows Media Player
|
||||
/(windows-media-player)\/([\w\.-]+)/i
|
||||
], [[NAME, /-/g, ' '], VERSION], [
|
||||
], [[NAME, /-/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/windows\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ (home media server)/i,
|
||||
// Windows Media Server
|
||||
], [VERSION, [NAME, 'Windows']], [
|
||||
], [VERSION, [NAME, 'Windows'], [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(com\.riseupradioalarm)\/([\d\.]*)/i // RiseUP Radio Alarm
|
||||
], [NAME, VERSION], [
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(rad.io)\s([\d\.]+)/i, // Rad.io
|
||||
/(radio.(?:de|at|fr))\s([\d\.]+)/i
|
||||
], [[NAME, 'rad.io'], VERSION]
|
||||
], [[NAME, 'rad.io'], VERSION, [TYPE, MEDIAPLAYER]]
|
||||
]
|
||||
});
|
||||
|
||||
////////////////////////
|
||||
// MODULES / LIBRARIES
|
||||
///////////////////////
|
||||
/////////////
|
||||
// LIBRARIES
|
||||
//////////////
|
||||
|
||||
const Modules = Object.freeze({
|
||||
const Libraries = Object.freeze({
|
||||
browser : [
|
||||
// Axios/jsdom/Scrapy
|
||||
[/\b(axios|jsdom|scrapy)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, MODULE]]
|
||||
[/\b(axios|jsdom|scrapy)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, LIBRARY]]
|
||||
]
|
||||
});
|
||||
|
||||
//////////
|
||||
// BOTS
|
||||
/////////
|
||||
|
||||
const Bots = Object.freeze({
|
||||
browser : [
|
||||
...CLIs.browser,
|
||||
...Crawlers.browser,
|
||||
...Fetchers.browser,
|
||||
...Libraries.browser
|
||||
]
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
Bots,
|
||||
CLIs,
|
||||
Crawlers,
|
||||
ExtraDevices,
|
||||
Emails,
|
||||
Fetchers,
|
||||
InApps,
|
||||
MediaPlayers,
|
||||
Modules
|
||||
Libraries,
|
||||
MediaPlayers
|
||||
};
|
||||
Reference in New Issue
Block a user