is-antibot 1.3.1 → 1.3.2

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 CHANGED
@@ -28,6 +28,7 @@
28
28
  - **ThreatMetrix** - LexisNexis fraud prevention and device fingerprinting
29
29
  - **Meetrics** - User authenticity verification
30
30
  - **Ocule** - Bot detection with advanced obfuscation
31
+ - **YouTube** - BotGuard attestation and abuse detection
31
32
  - **LinkedIn** - Bot filter protection
32
33
 
33
34
  ### CAPTCHA Providers
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "is-antibot",
3
3
  "description": "Identify if a response is an antibot challenge from CloudFlare, Akamai, DataDome, Vercel, PerimeterX, Shape Security, and more, including CAPTCHA providers like reCAPTCHA and hCaptcha.",
4
4
  "homepage": "https://github.com/microlinkhq/is-antibot",
5
- "version": "1.3.1",
5
+ "version": "1.3.2",
6
6
  "exports": {
7
7
  ".": "./src/index.js"
8
8
  },
@@ -55,7 +55,7 @@
55
55
  "waf"
56
56
  ],
57
57
  "dependencies": {
58
- "cookie-es": "~3.0.1",
58
+ "cookie-es": "~3.1.1",
59
59
  "debug-logfmt": "~1.4.7"
60
60
  },
61
61
  "devDependencies": {
package/src/index.js CHANGED
@@ -400,6 +400,12 @@ module.exports = ({ headers = {}, body = '', url = '' } = {}) => {
400
400
  return createResult(true, 'linkedin')
401
401
  }
402
402
 
403
+ // YouTube: empty title pattern indicates a degraded response requiring BotGuard JS attestation
404
+ // Normal pages have `<title>Video Title - YouTube</title>`, bots get `<title> - YouTube</title>`
405
+ if (body && testPattern(body, '<title>\\s*-\\s*YouTube<\\/title>', true)) {
406
+ return createResult(true, 'youtube')
407
+ }
408
+
403
409
  // AWS WAF: Check for x-amzn-waf-action or x-amzn-requestid headers
404
410
  // Reference: https://github.com/scrapfly/Antibot-Detector/blob/main/detectors/antibot/aws-waf.json
405
411
  if (