JS selenium webagents

gugol

Newbie
Joined
Mar 9, 2019
Messages
4
Reaction score
0
Hello,
I have an problem while using selenium on JS and changing webagents.
When my selenium visits site secured by CloudFlare the following alert prompts: "The owner of this website (sitelink) has banned your access based on your browser's signature" .
I don't know what is wrong. I use random-useragent module for getting useragents strings and than I put it to selenium while building like this:
Code:
userAgent = random_useragent.getRandom(function (ua) { return userAgent = ua.browserName === 'Chrome'; })

driver = new webdriver.Builder()
.withCapabilities({
browserName: "chrome",
chromeOptions: {args:['user-agent="' + userAgent + '"'] }
}).build();

Thanks for help!
 
I want to add that webagents changes, but I don't know what am I doing wrong and why CloudeFlare flags me.
 
Changing your browser user agent is not enough. They have much more detection in place. I suggest you to take as look at multilogin.com so you don't waste some much time trying to generate these finger prints or bypassing their detections. They are compatible with selenium which I've been messing around with so I can offer some help with that.
 
Back
Top