You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a better understanding of the progress of the proxies checks, here is an example of code using an flexible ascii progress bar: node-progress.
Rem:Pool is not accessible via require('free-proxy-checker')
// https://github.com/antoinevastel/free_proxy_checkerconst{ ProxyChecker, downloadAllProxies,}=require('free-proxy-checker');// https://github.com/visionmedia/node-progressconstProgressBar=require('progress');const{ Pool }=require('./pool.js');classProgressProxyCheckerextendsProxyChecker{asynccheckProxies(){this.lastCheck=Date.now();constpool=newPool(this.options.concurrency);constpbar=newProgressBar('Checking proxies [:bar] :percent :etas',{complete: '=',incomplete: ' ',width: 20,total: this.proxies.length});this.proxies.forEach((proxy)=>{pool.addTask(async()=>{try{awaitproxy._testConnection(this.options.timeout);}catch(_){}finally{if(this.options.verbose){pbar.tick();}}})})awaitpool.run();}}(async()=>{// Clear consoleprocess.stdout.write('\033c');// Download all proxies from all proxy providers at onceconstallProxies=awaitdownloadAllProxies();console.log(`There are ${allProxies.length} proxies to test`);// Check the availability of the proxies we downloadedconstproxyChecker=newProgressProxyChecker(allProxies,{concurrency: 50,timeout: 7500,verbose: true})awaitproxyChecker.checkProxies();constproxiesUp=proxyChecker.getProxiesUp();console.log(`There are ${proxiesUp.length} proxies UP:`);})();
Result:
The text was updated successfully, but these errors were encountered:
Hi, thanks for your idea. Since node-progress is a single file + seems really stable I think it's reasonable to add it as a dependency without going through package.json.
I keep the issue open. I will probably do a PR in the next days/weeks :)
For a better understanding of the progress of the proxies checks, here is an example of code using an flexible ascii progress bar: node-progress.
Rem:
Pool
is not accessible viarequire('free-proxy-checker')
Result:
The text was updated successfully, but these errors were encountered: