I m using puppeteer for scraping. I can pass navigator.webdriver property= false but i need to delete that prop completely.
https://bot.sannysoft.com/
I tried with passing false to navigator.webdriver. This trick can pass on https://intoli.com/blog/not-possible-to-block-chrome-headless/chrome-headless-test.html
but in https://bot.sannysoft.com/ cant.
here is webpage testing bot. This test is looking for are there any "webdriver" prop in navigator object. Doesn't care if its true or false. I need to remove this webdriver prop from browser.
Try this:
const newProto = navigator.__proto__;
delete newProto.webdriver;
navigator.__proto__ = newProto;
Since I can't comment, I'll leave an answer:
I had the same question, and @Nodarius's answer worked for me. Since you didn't accept it, I assume your problem is still persisting.
This is probably because, even if you run in, you need that code to run before the page loads (or before the website accesses the variable).
I achieved this using a proxy (https://mitmproxy.org/) which loads the script before the page loads.
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With