gimmeproxy-request
v1.0.12
Published
Automatically make request through random proxy using https://gimmeproxy.com service
Downloads
14
Readme
gimmeproxy-request [beta]
Make request through random proxy using https://gimmeproxy.com service.
This library automatically collects proxies from GimmeProxy in the background. Each request is routed through random proxy and retried automatically if needed.
This is wrapper around request
library, any request
options should work just fine.
Allows you to pass custom GimmeProxy api_key, query, retry count and test function.
How to use:
npm install --save gimmeproxy-request
const setup = require('gimmeproxy-request').setup;
const request = require('gimmeproxy-request').request;
setup({
api_key: 'your api key', // required
query: 'supportsHttps=true&anonymityLevel=1&websites=amazon&maxCheckPeriod=600', // additional gimmeproxy query parameters
retries: 5, // max retries before fail
test: (body, response) => body.indexOf('captcha') === -1 && response.statusCode === 200 // test function
});
request('https://example.com', {
timeout: 10000 // additional request parameters, see https://github.com/request/request
},
function(err, res, body) {
console.log('err', err)
console.log('res', res)
console.log('body', body)
process.exit()
});