@prohetamine/proxy-checker
Advanced tools
Comparing version 1.0.4 to 1.0.6
16
index.js
@@ -121,2 +121,3 @@ const request = require('request-promise') | ||
isBrowser = false, | ||
trashIgnore = false, | ||
debugBrowser = false, | ||
@@ -131,2 +132,3 @@ timeout = 10000, | ||
isBrowser: false, | ||
trashIgnore: false, | ||
debugBrowser: false, | ||
@@ -143,2 +145,3 @@ timeout: 10000, | ||
, _isBrowser = typeof(isBrowser) === 'boolean' ? isBrowser : false | ||
, _trashIgnore = typeof(trashIgnore) === 'boolean' ? trashIgnore : false | ||
, _debugBrowser = typeof(debugBrowser) === 'boolean' ? debugBrowser : false | ||
@@ -148,3 +151,3 @@ , _timeout = typeof(timeout) === 'number' ? timeout : 10000 | ||
, _debug = typeof(debug) === 'boolean' ? debug : false | ||
, _indicators = indicators instanceof Array ? indicators : [] | ||
, _indicators = indicators instanceof Array ? indicators : [] | ||
, _session = session | ||
@@ -200,2 +203,13 @@ ? (() => { | ||
if (_trashIgnore) { | ||
await page.setRequestInterception(true) | ||
page.on('request', request => { | ||
if (['media', 'xhr', 'fetch', 'websocket', 'manifest', 'image', 'stylesheet', 'font', 'script'].indexOf(request.resourceType()) !== -1) { | ||
request.abort() | ||
} else { | ||
request.continue() | ||
} | ||
}) | ||
} | ||
await page.goto(_url) | ||
@@ -202,0 +216,0 @@ |
{ | ||
"name": "@prohetamine/proxy-checker", | ||
"version": "1.0.4", | ||
"version": "1.0.6", | ||
"description": "Proxy parser & proxy checker", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -156,2 +156,3 @@ ![enter image description here](/media/logo.png) | ||
| isBrowser | boolean | false | нет | используется для проверки через браузер | | ||
| trashIgnore | boolean | false | нет | используется для оптимизации, убирает загрузку media, xhr, fetch, websocket, manifest, image, stylesheet, font, script | | ||
| debugBrowser | boolean | false | нет | используется для отладки выключает headless у puppeteer | | ||
@@ -182,2 +183,3 @@ | timeout | int | 10000 | нет | интервал в миллисекундах | | ||
isBrowser: true, | ||
trashIgnore: true, | ||
debugBrowser: false, | ||
@@ -507,2 +509,3 @@ timeout: 60000, | ||
| isBrowser | boolean | false | none | used for checking through the browser | | ||
| trashIgnore | boolean | false | none | used for optimization, removes loading of media, xhr, fetch, websocket, manifest, image, stylesheet, font, script | | ||
| debugBrowser | boolean | false | none | used for debugging disables headless in puppeteer | | ||
@@ -533,2 +536,3 @@ | timeout | int | 10000 | none | interval in milliseconds | | ||
isBrowser: true, | ||
trashIgnore: true, | ||
debugBrowser: false, | ||
@@ -535,0 +539,0 @@ timeout: 60000, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59274
387
703