bypass cloudflare protection with casperjs or phantomjs while using tor proxy

我是研究僧i 提交于 2019-12-12 03:34:41

问题


I use tor to access casperjs via this socks proxy my OS windows 10 x64

my test.js

var casper = require('casper').create({
verbose: true,
logLevel: 'error',
pageSettings: {
    loadImages: false, // The WebPage instance used by Casper will
    loadPlugins: false, // use these settings
    userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36'
    }
});
var caturl = ('http://www.test.com');
casper.start(caturl, function() {
    this.echo(this.getTitle());
});
casper.run();

result from my local machine

casperjs test.js
This Is Page Title

when open tor, and I'm sure its working fine also the socks proxy is working tested it before

casperjs  --proxy=127.0.0.1:9150 --proxy-type=socks5 test.js
Attention Required! | Cloudflare

the result as I see, that its want to solve recaptcha to open this site from cloudflare

BUT

when I open the tor browser, and open the link tested in casperjs, its open normally without any asking for recaptcha

WHY when open the link with casperjs ask for recaptcha , and when open the link with tor browser (same proxy IP used) it doesn't ask for recaptcha ?

is this related with useragent or what ?

来源:https://stackoverflow.com/questions/42000392/bypass-cloudflare-protection-with-casperjs-or-phantomjs-while-using-tor-proxy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!