ua-parser-js 2.0.0-rc.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -27
- package/dist/ua-parser.min.js +2 -2
- package/dist/ua-parser.pack.js +2 -2
- package/package.json +6 -5
- package/src/enums/ua-parser-enums.js +10 -2
- package/src/enums/ua-parser-enums.mjs +10 -2
- package/src/extensions/ua-parser-extensions.d.ts +3 -3
- package/src/extensions/ua-parser-extensions.js +69 -32
- package/src/extensions/ua-parser-extensions.mjs +69 -32
- package/src/helpers/ua-parser-helpers.d.ts +6 -4
- package/src/helpers/ua-parser-helpers.js +96 -13
- package/src/helpers/ua-parser-helpers.mjs +96 -13
- package/src/main/ua-parser.d.ts +4 -4
- package/src/main/ua-parser.js +37 -9
- package/src/main/ua-parser.mjs +37 -9
@@ -3,7 +3,7 @@
|
|
3
3
|
// Source: /src/enums/ua-parser-enums.js
|
4
4
|
|
5
5
|
///////////////////////////////////////////////
|
6
|
-
/* Enums for UAParser.js v2.0.0
|
6
|
+
/* Enums for UAParser.js v2.0.0
|
7
7
|
https://github.com/faisalman/ua-parser-js
|
8
8
|
Author: Faisal Salman <f@faisalman.com>
|
9
9
|
AGPLv3 License */
|
@@ -59,6 +59,7 @@ const Browser = Object.freeze({
|
|
59
59
|
GOOGLE_SEARCH: 'GSA',
|
60
60
|
HELIO: 'Helio',
|
61
61
|
HEYTAP: 'HeyTap',
|
62
|
+
HONOR: 'Honor',
|
62
63
|
HUAWEI: 'Huawei Browser',
|
63
64
|
ICAB: 'iCab',
|
64
65
|
ICE: 'ICE Browser',
|
@@ -162,7 +163,7 @@ const BrowserType = Object.freeze({
|
|
162
163
|
FETCHER: 'fetcher',
|
163
164
|
INAPP: 'inapp',
|
164
165
|
MEDIAPLAYER: 'mediaplayer',
|
165
|
-
|
166
|
+
LIBRARY: 'library'
|
166
167
|
});
|
167
168
|
|
168
169
|
const CPU = Object.freeze({
|
@@ -198,6 +199,7 @@ const Device = Object.freeze({
|
|
198
199
|
|
199
200
|
const Vendor = Object.freeze({
|
200
201
|
ACER: 'Acer',
|
202
|
+
ADVAN: 'Advan',
|
201
203
|
ALCATEL: 'Alcatel',
|
202
204
|
APPLE: 'Apple',
|
203
205
|
AMAZON: 'Amazon',
|
@@ -206,7 +208,9 @@ const Vendor = Object.freeze({
|
|
206
208
|
ATT: 'AT&T',
|
207
209
|
BENQ: 'BenQ',
|
208
210
|
BLACKBERRY: 'BlackBerry',
|
211
|
+
CAT: 'Cat',
|
209
212
|
DELL: 'Dell',
|
213
|
+
ENERGIZER: 'Energizer',
|
210
214
|
ESSENTIAL: 'Essential',
|
211
215
|
FACEBOOK: 'Facebook',
|
212
216
|
FAIRPHONE: 'Fairphone',
|
@@ -216,6 +220,7 @@ const Vendor = Object.freeze({
|
|
216
220
|
HP: 'HP',
|
217
221
|
HTC: 'HTC',
|
218
222
|
HUAWEI: 'Huawei',
|
223
|
+
IMO: 'IMO',
|
219
224
|
INFINIX: 'Infinix',
|
220
225
|
ITEL: 'itel',
|
221
226
|
JOLLA: 'Jolla',
|
@@ -223,6 +228,7 @@ const Vendor = Object.freeze({
|
|
223
228
|
LENOVO: 'Lenovo',
|
224
229
|
LG: 'LG',
|
225
230
|
MEIZU: 'Meizu',
|
231
|
+
MICROMAX: 'Micromax',
|
226
232
|
MICROSOFT: 'Microsoft',
|
227
233
|
MOTOROLA: 'Motorola',
|
228
234
|
NEXIAN: 'Nexian',
|
@@ -244,6 +250,7 @@ const Vendor = Object.freeze({
|
|
244
250
|
SAMSUNG: 'Samsung',
|
245
251
|
SHARP: 'Sharp',
|
246
252
|
SIEMENS: 'Siemens',
|
253
|
+
SMARTFREN: 'Smartfren',
|
247
254
|
SONY: 'Sony',
|
248
255
|
SPRINT: 'Sprint',
|
249
256
|
TCL: 'TCL',
|
@@ -277,6 +284,7 @@ const Engine = Object.freeze({
|
|
277
284
|
NETFRONT: 'NetFront',
|
278
285
|
NETSURF: 'NetSurf',
|
279
286
|
PRESTO: 'Presto',
|
287
|
+
SERVO: 'Servo',
|
280
288
|
TASMAN: 'Tasman',
|
281
289
|
TRIDENT: 'Trident',
|
282
290
|
W3M: 'w3m',
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// Type definitions for Helpers submodule of UAParser.js v2.0.0
|
1
|
+
// Type definitions for Helpers submodule of UAParser.js v2.0.0
|
2
2
|
// Project: https://github.com/faisalman/ua-parser-js
|
3
3
|
// Definitions by: Faisal Salman <https://github.com/faisalman>
|
4
4
|
|
@@ -11,5 +11,5 @@ export const ExtraDevices: UAParserExt;
|
|
11
11
|
export const Emails: UAParserExt;
|
12
12
|
export const Fetchers: UAParserExt;
|
13
13
|
export const InApps: UAParserExt;
|
14
|
-
export const
|
15
|
-
export const
|
14
|
+
export const Libraries: UAParserExt;
|
15
|
+
export const MediaPlayers: UAParserExt;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
///////////////////////////////////////////////
|
2
|
-
/* Extensions for UAParser.js v2.0.0
|
2
|
+
/* Extensions for UAParser.js v2.0.0
|
3
3
|
https://github.com/faisalman/ua-parser-js
|
4
4
|
Author: Faisal Salman <f@faisalman.com>
|
5
5
|
AGPLv3 License */
|
@@ -20,7 +20,7 @@ const EMAIL = 'email';
|
|
20
20
|
const FETCHER = 'fetcher';
|
21
21
|
const INAPP = 'inapp';
|
22
22
|
const MEDIAPLAYER = 'mediaplayer';
|
23
|
-
const
|
23
|
+
const LIBRARY = 'library';
|
24
24
|
|
25
25
|
//////////////////////
|
26
26
|
// COMMAND LINE APPS
|
@@ -28,8 +28,8 @@ const MODULE = 'module';
|
|
28
28
|
|
29
29
|
const CLIs = Object.freeze({
|
30
30
|
browser : [
|
31
|
-
// wget / curl /
|
32
|
-
[/(wget|curl|lynx)[\/ ]([\w
|
31
|
+
// wget / curl / Lynx / ELinks / HTTPie
|
32
|
+
[/(wget|curl|lynx|elinks|httpie)[\/ ]\(?([\w\.-]+)/i], [NAME, VERSION, [TYPE, CLI]]
|
33
33
|
]
|
34
34
|
});
|
35
35
|
|
@@ -42,28 +42,41 @@ const Crawlers = Object.freeze({
|
|
42
42
|
[
|
43
43
|
// AhrefsBot - https://ahrefs.com/robot
|
44
44
|
// Amazonbot - https://developer.amazon.com/amazonbot
|
45
|
-
// Applebot - http://apple.com/go/applebot
|
46
45
|
// Bingbot - http://www.bing.com/bingbot.htm
|
46
|
+
// CCBot - https://commoncrawl.org/faq
|
47
47
|
// Dotbot - https://moz.com/help/moz-procedures/crawlers/dotbot
|
48
48
|
// DuckDuckBot - http://duckduckgo.com/duckduckbot.html
|
49
49
|
// FacebookBot - https://developers.facebook.com/docs/sharing/bot/
|
50
50
|
// GPTBot - https://platform.openai.com/docs/gptbot
|
51
51
|
// MJ12bot - https://mj12bot.com/
|
52
|
-
//
|
52
|
+
// MojeekBot - https://www.mojeek.com/bot.html
|
53
|
+
// OpenAI's SearchGPT - https://platform.openai.com/docs/bots
|
54
|
+
// PerplexityBot - https://perplexity.ai/perplexitybot
|
53
55
|
// SemrushBot - http://www.semrush.com/bot.html
|
54
|
-
/
|
56
|
+
// SeznamBot - http://napoveda.seznam.cz/seznambot-intro
|
57
|
+
/((?:ahrefs|amazon|bing|cc|dot|duckduck|exa|facebook|gpt|mj12|mojeek|oai-search|perplexity|semrush|seznam)bot)\/([\w\.-]+)/i,
|
58
|
+
|
59
|
+
// Applebot - http://apple.com/go/applebot
|
60
|
+
/(applebot(?:-extended)?)\/([\w\.]+)/i,
|
55
61
|
|
56
62
|
// Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001
|
57
63
|
/(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i,
|
58
64
|
|
59
|
-
// ClaudeBot
|
60
|
-
/(claude(?:bot|-web))
|
65
|
+
// ClaudeBot (Anthropic)
|
66
|
+
/(claude(?:bot|-web)|anthropic-ai)\/?([\w\.]*)/i,
|
61
67
|
|
62
68
|
// Coc Coc Bot - https://help.coccoc.com/en/search-engine
|
63
69
|
/(coccocbot-(?:image|web))\/([\w\.]+)/i,
|
64
70
|
|
71
|
+
// Facebook / Meta
|
72
|
+
// https://developers.facebook.com/docs/sharing/webmasters/web-crawlers
|
73
|
+
/(facebook(?:externalhit|catalog)|meta-externalagent)\/([\w\.]+)/i,
|
74
|
+
|
65
75
|
// Googlebot - http://www.google.com/bot.html
|
66
|
-
/(google(?:bot|other)(?:-image|-video|-news
|
76
|
+
/(google(?:bot|other|-inspectiontool)(?:-image|-video|-news)?|storebot-google)\/?([\w\.]*)/i,
|
77
|
+
|
78
|
+
// Internet Archive (archive.org)
|
79
|
+
/(ia_archiver|archive\.org_bot)\/?([\w\.]*)/i,
|
67
80
|
|
68
81
|
// Sogou Spider
|
69
82
|
/(sogou (?:pic|head|web|orion|news) spider)\/([\w\.]+)/i,
|
@@ -72,14 +85,31 @@ const Crawlers = Object.freeze({
|
|
72
85
|
/(y!?j-(?:asr|br[uw]|dscv|mmp|vsidx|wsc))\/([\w\.]+)/i,
|
73
86
|
|
74
87
|
// Yandex Bots - https://yandex.com/bots
|
75
|
-
/(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
|
88
|
+
/(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,
|
89
|
+
|
90
|
+
// Yeti (Naver)
|
91
|
+
/(yeti)\/([\w\.]+)/i,
|
92
|
+
|
93
|
+
// aiHitBot / Diffbot / Magpie-Crawler / Omgilibot / Webzio-Extended / Screaming Frog SEO Spider / Timpibot / VelenPublicWebCrawler / YisouSpider / YouBot
|
94
|
+
/((?:aihit|diff|timpi|you)bot|omgili(?:bot)?|(?:magpie-|velenpublicweb)crawler|webzio-extended|(?:screaming frog seo |yisou)spider)\/?([\w\.]*)/i
|
76
95
|
],
|
77
96
|
|
78
97
|
[NAME, VERSION, [TYPE, CRAWLER]],
|
79
98
|
|
80
|
-
|
81
|
-
|
82
|
-
|
99
|
+
[
|
100
|
+
// Google Bots
|
101
|
+
/((?:adsbot|apis|mediapartners)-google(?:-mobile)?|google-?(?:other|cloudvertexbot|extended|safety))/i,
|
102
|
+
|
103
|
+
// AI2Bot - https://allenai.org/crawler
|
104
|
+
// Bytespider
|
105
|
+
// DataForSeoBot - https://dataforseo.com/dataforseo-bot
|
106
|
+
// Huawei AspiegelBot / PetalBot https://aspiegel.com/petalbot
|
107
|
+
// ImagesiftBot - https://imagesift.com/about
|
108
|
+
// Qihoo 360Spider
|
109
|
+
// TurnitinBot - https://www.turnitin.com/robot/crawlerinfo.html
|
110
|
+
// Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp
|
111
|
+
/\b(360spider-?(?:image|video)?|bytespider|(?:ai2|aspiegel|dataforseo|imagesift|petal|turnitin)bot|teoma|(?=yahoo! )slurp)/i
|
112
|
+
],
|
83
113
|
[NAME, [TYPE, CRAWLER]]
|
84
114
|
]
|
85
115
|
});
|
@@ -170,8 +200,10 @@ const ExtraDevices = Object.freeze({
|
|
170
200
|
|
171
201
|
const Emails = Object.freeze({
|
172
202
|
browser : [
|
173
|
-
|
174
|
-
|
203
|
+
[
|
204
|
+
// Evolution / Kontact/KMail / [Microsoft/Mac] Outlook / Thunderbird
|
205
|
+
/(airmail|bluemail|emclient|evolution|foxmail|kmail2?|kontact|(?:microsoft |mac)?outlook(?:-express)?|navermailapp|(?!chrom.+)sparrow|thunderbird|yahoo)(?:m.+ail; |[\/ ])([\w\.]+)/i
|
206
|
+
], [NAME, VERSION, [TYPE, EMAIL]]
|
175
207
|
]
|
176
208
|
});
|
177
209
|
|
@@ -184,8 +216,15 @@ const Fetchers = Object.freeze({
|
|
184
216
|
[
|
185
217
|
// AhrefsSiteAudit - https://ahrefs.com/robot/site-audit
|
186
218
|
// ChatGPT-User - https://platform.openai.com/docs/plugins/bot
|
219
|
+
// DuckAssistBot - https://duckduckgo.com/duckassistbot/
|
187
220
|
// BingPreview / Mastodon / Pinterestbot / Redditbot / Rogerbot / Telegrambot / Twitterbot / UptimeRobot
|
188
|
-
/(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
|
221
|
+
/(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
|
222
|
+
|
223
|
+
// Google Site Verifier
|
224
|
+
/(google-site-verification)\/([\w\.]+)/i,
|
225
|
+
|
226
|
+
// Meta
|
227
|
+
/(meta-externalfetcher)\/([\w\.]+)/i,
|
189
228
|
|
190
229
|
// Slackbot - https://api.slack.com/robots
|
191
230
|
/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
|
@@ -202,8 +241,8 @@ const Fetchers = Object.freeze({
|
|
202
241
|
],
|
203
242
|
[NAME, VERSION, [TYPE, FETCHER]],
|
204
243
|
|
205
|
-
// Google Bots / Snapchat
|
206
|
-
[/(feedfetcher-google|google
|
244
|
+
// Google Bots / Cohere / Snapchat / Vercelbot
|
245
|
+
[/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat)/i],
|
207
246
|
[NAME, [TYPE, FETCHER]],
|
208
247
|
]
|
209
248
|
});
|
@@ -252,8 +291,8 @@ const MediaPlayers = Object.freeze({
|
|
252
291
|
/(flrp)\/([\w\.-]+)/i // Flip Player
|
253
292
|
], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [
|
254
293
|
|
255
|
-
/(fstream|nativehost|queryseekspider
|
256
|
-
// FStream/NativeHost/QuerySeekSpider
|
294
|
+
/(fstream|nativehost|queryseekspider)/i
|
295
|
+
// FStream/NativeHost/QuerySeekSpider
|
257
296
|
], [NAME, [TYPE, MEDIAPLAYER]], [
|
258
297
|
|
259
298
|
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
|
@@ -261,8 +300,6 @@ const MediaPlayers = Object.freeze({
|
|
261
300
|
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
262
301
|
|
263
302
|
/(htc streaming player)\s[\w_]+\s\/\s([\d\.]+)/i, // HTC Streaming Player
|
264
|
-
/(java|python-urllib|python-requests|wget|libcurl)\/([\w\.-_]+)/i,
|
265
|
-
// Java/urllib/requests/wget/cURL
|
266
303
|
/(lavf)([\d\.]+)/i // Lavf (FFMPEG)
|
267
304
|
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
268
305
|
|
@@ -332,14 +369,14 @@ const MediaPlayers = Object.freeze({
|
|
332
369
|
]
|
333
370
|
});
|
334
371
|
|
335
|
-
|
336
|
-
//
|
337
|
-
|
372
|
+
/////////////
|
373
|
+
// LIBRARIES
|
374
|
+
//////////////
|
338
375
|
|
339
|
-
const
|
376
|
+
const Libraries = Object.freeze({
|
340
377
|
browser : [
|
341
|
-
// Axios/jsdom/Scrapy
|
342
|
-
[/\b(axios|jsdom|scrapy)\/([\w\.]+)/i], [NAME, VERSION, [TYPE,
|
378
|
+
// Axios/jsdom/Scrapy/Java/urllib/requests
|
379
|
+
[/\b(axios|jsdom|scrapy|java|python-urllib|python-requests)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, LIBRARY]]
|
343
380
|
]
|
344
381
|
});
|
345
382
|
|
@@ -352,7 +389,7 @@ const Bots = Object.freeze({
|
|
352
389
|
...CLIs.browser,
|
353
390
|
...Crawlers.browser,
|
354
391
|
...Fetchers.browser,
|
355
|
-
...
|
392
|
+
...Libraries.browser
|
356
393
|
]
|
357
394
|
});
|
358
395
|
|
@@ -364,6 +401,6 @@ module.exports = {
|
|
364
401
|
Emails,
|
365
402
|
Fetchers,
|
366
403
|
InApps,
|
367
|
-
|
368
|
-
|
404
|
+
Libraries,
|
405
|
+
MediaPlayers
|
369
406
|
};
|
@@ -3,7 +3,7 @@
|
|
3
3
|
// Source: /src/extensions/ua-parser-extensions.js
|
4
4
|
|
5
5
|
///////////////////////////////////////////////
|
6
|
-
/* Extensions for UAParser.js v2.0.0
|
6
|
+
/* Extensions for UAParser.js v2.0.0
|
7
7
|
https://github.com/faisalman/ua-parser-js
|
8
8
|
Author: Faisal Salman <f@faisalman.com>
|
9
9
|
AGPLv3 License */
|
@@ -24,7 +24,7 @@ const EMAIL = 'email';
|
|
24
24
|
const FETCHER = 'fetcher';
|
25
25
|
const INAPP = 'inapp';
|
26
26
|
const MEDIAPLAYER = 'mediaplayer';
|
27
|
-
const
|
27
|
+
const LIBRARY = 'library';
|
28
28
|
|
29
29
|
//////////////////////
|
30
30
|
// COMMAND LINE APPS
|
@@ -32,8 +32,8 @@ const MODULE = 'module';
|
|
32
32
|
|
33
33
|
const CLIs = Object.freeze({
|
34
34
|
browser : [
|
35
|
-
// wget / curl /
|
36
|
-
[/(wget|curl|lynx)[\/ ]([\w
|
35
|
+
// wget / curl / Lynx / ELinks / HTTPie
|
36
|
+
[/(wget|curl|lynx|elinks|httpie)[\/ ]\(?([\w\.-]+)/i], [NAME, VERSION, [TYPE, CLI]]
|
37
37
|
]
|
38
38
|
});
|
39
39
|
|
@@ -46,28 +46,41 @@ const Crawlers = Object.freeze({
|
|
46
46
|
[
|
47
47
|
// AhrefsBot - https://ahrefs.com/robot
|
48
48
|
// Amazonbot - https://developer.amazon.com/amazonbot
|
49
|
-
// Applebot - http://apple.com/go/applebot
|
50
49
|
// Bingbot - http://www.bing.com/bingbot.htm
|
50
|
+
// CCBot - https://commoncrawl.org/faq
|
51
51
|
// Dotbot - https://moz.com/help/moz-procedures/crawlers/dotbot
|
52
52
|
// DuckDuckBot - http://duckduckgo.com/duckduckbot.html
|
53
53
|
// FacebookBot - https://developers.facebook.com/docs/sharing/bot/
|
54
54
|
// GPTBot - https://platform.openai.com/docs/gptbot
|
55
55
|
// MJ12bot - https://mj12bot.com/
|
56
|
-
//
|
56
|
+
// MojeekBot - https://www.mojeek.com/bot.html
|
57
|
+
// OpenAI's SearchGPT - https://platform.openai.com/docs/bots
|
58
|
+
// PerplexityBot - https://perplexity.ai/perplexitybot
|
57
59
|
// SemrushBot - http://www.semrush.com/bot.html
|
58
|
-
/
|
60
|
+
// SeznamBot - http://napoveda.seznam.cz/seznambot-intro
|
61
|
+
/((?:ahrefs|amazon|bing|cc|dot|duckduck|exa|facebook|gpt|mj12|mojeek|oai-search|perplexity|semrush|seznam)bot)\/([\w\.-]+)/i,
|
62
|
+
|
63
|
+
// Applebot - http://apple.com/go/applebot
|
64
|
+
/(applebot(?:-extended)?)\/([\w\.]+)/i,
|
59
65
|
|
60
66
|
// Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001
|
61
67
|
/(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i,
|
62
68
|
|
63
|
-
// ClaudeBot
|
64
|
-
/(claude(?:bot|-web))
|
69
|
+
// ClaudeBot (Anthropic)
|
70
|
+
/(claude(?:bot|-web)|anthropic-ai)\/?([\w\.]*)/i,
|
65
71
|
|
66
72
|
// Coc Coc Bot - https://help.coccoc.com/en/search-engine
|
67
73
|
/(coccocbot-(?:image|web))\/([\w\.]+)/i,
|
68
74
|
|
75
|
+
// Facebook / Meta
|
76
|
+
// https://developers.facebook.com/docs/sharing/webmasters/web-crawlers
|
77
|
+
/(facebook(?:externalhit|catalog)|meta-externalagent)\/([\w\.]+)/i,
|
78
|
+
|
69
79
|
// Googlebot - http://www.google.com/bot.html
|
70
|
-
/(google(?:bot|other)(?:-image|-video|-news
|
80
|
+
/(google(?:bot|other|-inspectiontool)(?:-image|-video|-news)?|storebot-google)\/?([\w\.]*)/i,
|
81
|
+
|
82
|
+
// Internet Archive (archive.org)
|
83
|
+
/(ia_archiver|archive\.org_bot)\/?([\w\.]*)/i,
|
71
84
|
|
72
85
|
// Sogou Spider
|
73
86
|
/(sogou (?:pic|head|web|orion|news) spider)\/([\w\.]+)/i,
|
@@ -76,14 +89,31 @@ const Crawlers = Object.freeze({
|
|
76
89
|
/(y!?j-(?:asr|br[uw]|dscv|mmp|vsidx|wsc))\/([\w\.]+)/i,
|
77
90
|
|
78
91
|
// Yandex Bots - https://yandex.com/bots
|
79
|
-
/(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
|
92
|
+
/(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,
|
93
|
+
|
94
|
+
// Yeti (Naver)
|
95
|
+
/(yeti)\/([\w\.]+)/i,
|
96
|
+
|
97
|
+
// aiHitBot / Diffbot / Magpie-Crawler / Omgilibot / Webzio-Extended / Screaming Frog SEO Spider / Timpibot / VelenPublicWebCrawler / YisouSpider / YouBot
|
98
|
+
/((?:aihit|diff|timpi|you)bot|omgili(?:bot)?|(?:magpie-|velenpublicweb)crawler|webzio-extended|(?:screaming frog seo |yisou)spider)\/?([\w\.]*)/i
|
80
99
|
],
|
81
100
|
|
82
101
|
[NAME, VERSION, [TYPE, CRAWLER]],
|
83
102
|
|
84
|
-
|
85
|
-
|
86
|
-
|
103
|
+
[
|
104
|
+
// Google Bots
|
105
|
+
/((?:adsbot|apis|mediapartners)-google(?:-mobile)?|google-?(?:other|cloudvertexbot|extended|safety))/i,
|
106
|
+
|
107
|
+
// AI2Bot - https://allenai.org/crawler
|
108
|
+
// Bytespider
|
109
|
+
// DataForSeoBot - https://dataforseo.com/dataforseo-bot
|
110
|
+
// Huawei AspiegelBot / PetalBot https://aspiegel.com/petalbot
|
111
|
+
// ImagesiftBot - https://imagesift.com/about
|
112
|
+
// Qihoo 360Spider
|
113
|
+
// TurnitinBot - https://www.turnitin.com/robot/crawlerinfo.html
|
114
|
+
// Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp
|
115
|
+
/\b(360spider-?(?:image|video)?|bytespider|(?:ai2|aspiegel|dataforseo|imagesift|petal|turnitin)bot|teoma|(?=yahoo! )slurp)/i
|
116
|
+
],
|
87
117
|
[NAME, [TYPE, CRAWLER]]
|
88
118
|
]
|
89
119
|
});
|
@@ -174,8 +204,10 @@ const ExtraDevices = Object.freeze({
|
|
174
204
|
|
175
205
|
const Emails = Object.freeze({
|
176
206
|
browser : [
|
177
|
-
|
178
|
-
|
207
|
+
[
|
208
|
+
// Evolution / Kontact/KMail / [Microsoft/Mac] Outlook / Thunderbird
|
209
|
+
/(airmail|bluemail|emclient|evolution|foxmail|kmail2?|kontact|(?:microsoft |mac)?outlook(?:-express)?|navermailapp|(?!chrom.+)sparrow|thunderbird|yahoo)(?:m.+ail; |[\/ ])([\w\.]+)/i
|
210
|
+
], [NAME, VERSION, [TYPE, EMAIL]]
|
179
211
|
]
|
180
212
|
});
|
181
213
|
|
@@ -188,8 +220,15 @@ const Fetchers = Object.freeze({
|
|
188
220
|
[
|
189
221
|
// AhrefsSiteAudit - https://ahrefs.com/robot/site-audit
|
190
222
|
// ChatGPT-User - https://platform.openai.com/docs/plugins/bot
|
223
|
+
// DuckAssistBot - https://duckduckgo.com/duckassistbot/
|
191
224
|
// BingPreview / Mastodon / Pinterestbot / Redditbot / Rogerbot / Telegrambot / Twitterbot / UptimeRobot
|
192
|
-
/(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
|
225
|
+
/(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
|
226
|
+
|
227
|
+
// Google Site Verifier
|
228
|
+
/(google-site-verification)\/([\w\.]+)/i,
|
229
|
+
|
230
|
+
// Meta
|
231
|
+
/(meta-externalfetcher)\/([\w\.]+)/i,
|
193
232
|
|
194
233
|
// Slackbot - https://api.slack.com/robots
|
195
234
|
/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
|
@@ -206,8 +245,8 @@ const Fetchers = Object.freeze({
|
|
206
245
|
],
|
207
246
|
[NAME, VERSION, [TYPE, FETCHER]],
|
208
247
|
|
209
|
-
// Google Bots / Snapchat
|
210
|
-
[/(feedfetcher-google|google
|
248
|
+
// Google Bots / Cohere / Snapchat / Vercelbot
|
249
|
+
[/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat)/i],
|
211
250
|
[NAME, [TYPE, FETCHER]],
|
212
251
|
]
|
213
252
|
});
|
@@ -256,8 +295,8 @@ const MediaPlayers = Object.freeze({
|
|
256
295
|
/(flrp)\/([\w\.-]+)/i // Flip Player
|
257
296
|
], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [
|
258
297
|
|
259
|
-
/(fstream|nativehost|queryseekspider
|
260
|
-
// FStream/NativeHost/QuerySeekSpider
|
298
|
+
/(fstream|nativehost|queryseekspider)/i
|
299
|
+
// FStream/NativeHost/QuerySeekSpider
|
261
300
|
], [NAME, [TYPE, MEDIAPLAYER]], [
|
262
301
|
|
263
302
|
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
|
@@ -265,8 +304,6 @@ const MediaPlayers = Object.freeze({
|
|
265
304
|
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
266
305
|
|
267
306
|
/(htc streaming player)\s[\w_]+\s\/\s([\d\.]+)/i, // HTC Streaming Player
|
268
|
-
/(java|python-urllib|python-requests|wget|libcurl)\/([\w\.-_]+)/i,
|
269
|
-
// Java/urllib/requests/wget/cURL
|
270
307
|
/(lavf)([\d\.]+)/i // Lavf (FFMPEG)
|
271
308
|
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
272
309
|
|
@@ -336,14 +373,14 @@ const MediaPlayers = Object.freeze({
|
|
336
373
|
]
|
337
374
|
});
|
338
375
|
|
339
|
-
|
340
|
-
//
|
341
|
-
|
376
|
+
/////////////
|
377
|
+
// LIBRARIES
|
378
|
+
//////////////
|
342
379
|
|
343
|
-
const
|
380
|
+
const Libraries = Object.freeze({
|
344
381
|
browser : [
|
345
|
-
// Axios/jsdom/Scrapy
|
346
|
-
[/\b(axios|jsdom|scrapy)\/([\w\.]+)/i], [NAME, VERSION, [TYPE,
|
382
|
+
// Axios/jsdom/Scrapy/Java/urllib/requests
|
383
|
+
[/\b(axios|jsdom|scrapy|java|python-urllib|python-requests)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, LIBRARY]]
|
347
384
|
]
|
348
385
|
});
|
349
386
|
|
@@ -356,7 +393,7 @@ const Bots = Object.freeze({
|
|
356
393
|
...CLIs.browser,
|
357
394
|
...Crawlers.browser,
|
358
395
|
...Fetchers.browser,
|
359
|
-
...
|
396
|
+
...Libraries.browser
|
360
397
|
]
|
361
398
|
});
|
362
399
|
|
@@ -368,6 +405,6 @@ export {
|
|
368
405
|
Emails,
|
369
406
|
Fetchers,
|
370
407
|
InApps,
|
371
|
-
|
372
|
-
|
408
|
+
Libraries,
|
409
|
+
MediaPlayers
|
373
410
|
};
|
@@ -1,13 +1,14 @@
|
|
1
|
-
// Type definitions for Helpers submodule of UAParser.js v2.0.0
|
1
|
+
// Type definitions for Helpers submodule of UAParser.js v2.0.0
|
2
2
|
// Project: https://github.com/faisalman/ua-parser-js
|
3
3
|
// Definitions by: Faisal Salman <https://github.com/faisalman>
|
4
4
|
|
5
5
|
import { IResult } from "../main/ua-parser";
|
6
6
|
|
7
7
|
declare function getDeviceVendor(model: string): string | undefined;
|
8
|
-
declare function isAppleSilicon(
|
9
|
-
declare function
|
10
|
-
declare function
|
8
|
+
declare function isAppleSilicon(resultOrUA: IResult | string): boolean;
|
9
|
+
declare function isAIBot(resultOrUA: IResult | string): boolean;
|
10
|
+
declare function isBot(resultOrUA: IResult | string): boolean;
|
11
|
+
declare function isChromeFamily(resultOrUA: IResult | string): boolean;
|
11
12
|
declare function isElectron(): boolean;
|
12
13
|
declare function isFromEU(): boolean;
|
13
14
|
declare function isFrozenUA(ua: string): boolean;
|
@@ -16,6 +17,7 @@ declare function isStandalonePWA(): boolean;
|
|
16
17
|
export {
|
17
18
|
getDeviceVendor,
|
18
19
|
isAppleSilicon,
|
20
|
+
isAIBot,
|
19
21
|
isBot,
|
20
22
|
isChromeFamily,
|
21
23
|
isElectron,
|