is-antibot 0.0.1 → 0.0.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +4 -2
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "is-antibot",
3
3
  "description": "Detect Captcha responses",
4
4
  "homepage": "https://github.com/kikobeats/is-antibot",
5
- "version": "0.0.1",
5
+ "version": "0.0.2",
6
6
  "author": {
7
7
  "name": "Kiko Beats",
8
8
  "email": "josefrancisco.verdu@gmail.com",
package/src/index.js CHANGED
@@ -16,9 +16,9 @@ module.exports = ({ url, htmlDom, html, headers = {} } = {}) => {
16
16
  return true
17
17
  }
18
18
 
19
- const { domainWithoutSuffix } = parseUrl(url)
19
+ const parsedUrl = parseUrl(url)
20
20
 
21
- if (domainWithoutSuffix === 'reddit') {
21
+ if (parsedUrl.domainWithoutSuffix === 'reddit') {
22
22
  const condition = htmlDom.text().includes('Prove your humanity')
23
23
  if (condition) {
24
24
  debug({ provider: 'reddit' })
@@ -26,5 +26,7 @@ module.exports = ({ url, htmlDom, html, headers = {} } = {}) => {
26
26
  }
27
27
  }
28
28
 
29
+ debug({ provider: 'unknown', ...parsedUrl })
30
+
29
31
  return false
30
32
  }