How to use the proxy function from commander
Find comprehensive JavaScript commander.proxy code examples handpicked from public code repositorys.
GitHub: raawaa/jav-scrapy
35 36 37 38 39 40 41 42 43 44
.parse(process.argv); var parallel = parseInt(program.parallel); var timeout = parseInt(program.timeout) || 30000; var proxy = process.env.http_proxy || program.proxy; // console.log('proxy: ', proxy); request = request.defaults({ timeout: timeout, headers: {
214
974
47
487 488 489 490 491 492 493 494 495 496
if (program.caFile) { global.caFileContent = fs.readFileSync(program.caFile); } if (program.proxy) { global.proxyUri = program.proxy; // used by Clickim internally and by the runner, included here lazily to not make things slower for the // non-proxy case global.SuperagentProxy = require('superagent-proxy'); global.ProxyAgent = require('proxy-agent');
0
0
0
+ 24 other calls in file
commander.Option is the most popular function in commander (1786 examples)